This is the mail archive of the
mailing list for the Cygwin project.
RE: objdump : inaccurate demangling for foo(char* const)
- From: "Hannu E K Nevalainen \(garbage mail\)" <garbage_collector at telia dot com>
- To: <cygwin at cygwin dot com>
- Date: Fri, 19 Sep 2003 18:16:13 +0200
- Subject: RE: objdump : inaccurate demangling for foo(char* const)
> From: email@example.com [mailto:firstname.lastname@example.org]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
-- UTC+01, DST -> UTC+02 --
--END OF MESSAGE--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html