This is the mail archive of the binutils@sourceware.org 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: Symbols defined via linker script: local or global?


On Thu, May 12, 2016 at 01:04:52PM +0200, Sebastian Huber wrote:
> Hello,
> 
> I define a symbol in a custom linker script, e.g.
> 
> foo = 0x123;
> 
> In case I reference this symbol in my executable (e.g. printf("%p\n", foo)),
> then the symbol is global in the ELF file. In case it is not referenced by
> the executable, then it is local.

What target, and what options were you passing to ld?

-- 
Alan Modra
Australia Development Lab, IBM


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