Re: C++ name mangling for local entities

2006-10-20 Thread Geoffrey Keating
On 19/10/2006, at 9:17 PM, Mark Mitchell wrote: Geoffrey Keating wrote: For GCC, I've found it necessary to have a way to name local (that is, namespace-scope 'static') variables and functions which allows more than one such symbol to be present and have distinct mangled names. With my

Re: C++ name mangling for local entities

2006-10-20 Thread Mark Mitchell
we should add a feature to the assembler like: .asm_alias x = y that says references to x are emitted as references to a new y, distinct from all other y references. On Darwin, all the DWARF information in .o files is matched by nameĀ¹ with symbols in the executable, so this won't

C++ name mangling for local entities

2006-10-19 Thread Geoffrey Keating
For GCC, I've found it necessary to have a way to name local (that is, namespace-scope 'static') variables and functions which allows more than one such symbol to be present and have distinct mangled names. Since the variables are 'static' there are no ABI concerns, but it would nice to do this

Re: C++ name mangling for local entities

2006-10-19 Thread Ian Lance Taylor
[EMAIL PROTECTED] (Geoffrey Keating) writes: For GCC, I've found it necessary to have a way to name local (that is, namespace-scope 'static') variables and functions which allows more than one such symbol to be present and have distinct mangled names. Out of curiousity: why start the name

Re: C++ name mangling for local entities

2006-10-19 Thread Geoffrey Keating
On 19/10/2006, at 3:04 PM, Ian Lance Taylor wrote: [EMAIL PROTECTED] (Geoffrey Keating) writes: For GCC, I've found it necessary to have a way to name local (that is, namespace-scope 'static') variables and functions which allows more than one such symbol to be present and have distinct

Re: C++ name mangling for local entities

2006-10-19 Thread Mark Mitchell
Geoffrey Keating wrote: For GCC, I've found it necessary to have a way to name local (that is, namespace-scope 'static') variables and functions which allows more than one such symbol to be present and have distinct mangled names. With my GCC hat on, I don't think this is desirable. For ELF