delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/09/19/12:16:44

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: "Hannu E K Nevalainen \(garbage mail\)" <garbage_collector AT telia DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: objdump : inaccurate demangling for foo(char* const)
Date: Fri, 19 Sep 2003 18:16:13 +0200
Message-ID: <NGBBLLIAMFLGJEOAJCCEEEEPDEAA.garbage_collector@telia.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
In-Reply-To: <20030919095141.GE21770@linux_rln.harvest>
Importance: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

> From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com]On Behalf
> Of Ronald Landheer-Cieslak

> AFAIK, const is a compiler directive - there is nothing in the assembler
> that make a symbol const. You should see const more like a promise: "I
> promise I won't change the value of this variable". That promise can be
> broken by a const-cast,

 K&R, 2nd edition, p211 last paragraph, last sentence: "Except that it
should diagnose explicit attempts to change const objects, a compiler may
ignore these qualifiers."

> and the assembler code doesn't know anything about
> it (AFAIK, there is no const in assembler, but I might be mistaken there).

 This is very true, at least for the M68K assemblers that I know of. Nor
have I seen such a thing in x86 assemblers (less knowledge).
But: SECTION's (a program data/code "hunk" - in Amiga terms) can be set to
readonly - which _may_ be enforced depending on set assembler options (i.e.
to generate stuff for ROM).

/Hannu E K Nevalainen, B.Sc. EE -and- long standing M68K <'020 assembler
"guru".
-- UTC+01, DST -> UTC+02  --
--END OF MESSAGE--


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019