This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Need Help on Symbol/Variable Name Problem


type SYMBOL asm ("ALIAS");


On Tue, 5 Feb 2002 07:51:23 -0800 (PST)
Jing Gloria <> 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.
> Regards,
> Jing Gloria
> Texas Instruments
> Sherman, TX
> __________________________________________________
> Do You Yahoo!?
> Send FREE Valentine eCards with Yahoo! Greetings!

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]