This is the mail archive of the
mailing list for the binutils project.
Re: Need Help on Symbol/Variable Name Problem
- From: Dimmy <diwil at mail dot ru>
- To: Jing Gloria <jing106 at rocketmail dot com>
- Cc: binutils at sources dot redhat dot com, j-gloria at ti dot com
- Date: Tue, 5 Feb 2002 22:20:56 +0300
- Subject: Re: Need Help on Symbol/Variable Name Problem
- References: <email@example.com>
type SYMBOL asm ("ALIAS");
On Tue, 5 Feb 2002 07:51:23 -0800 (PST)
Jing Gloria <firstname.lastname@example.org> wrote:
> I hope I am addressing this question ot the right forum. I apologize in
> advance if my topic below is not for this forum.
> Is there a way to write an assembly code so that two different symbols
> (actually global variable names) get resolved to the same memory location?
> I am porting old software written in C and Pascal. Using GNU C and Pascal
> compilers, I have a problem with the global variable names which GNU Pascal
> transforms to uppercase first character and lowercase for the rest and GCC not
> making any changes to the variable name. So a variable name TestVar will be
> transformed to Testvar in GNU Pascal. Our C source file convention declares
> the variable names as all lower case; e.g. testvar. I would like the linker to
> allocate the same memory location for Testvar and testvar. I know about
> asmname and __asm__ directives and have used them were practical. However, I
> have around 10 global variables which are used in a couple of hundred of C and
> Pascal source file modules and I would like to avoid editing the files just to
> add the asmname directive.
> Thanks in advance for any assistance extended.
> Jing Gloria
> Texas Instruments
> Sherman, TX
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!