This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Symbols defined via linker script: local or global?
- From: Sebastian Huber <sebastian dot huber at embedded-brains dot de>
- To: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Thu, 12 May 2016 13:04:52 +0200
- Subject: Symbols defined via linker script: local or global?
- Authentication-results: sourceware.org; auth=none
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. I didn't find a
documentation reference for this behaviour. Is this working as intended?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschÃftliche Mitteilung im Sinne des EHUG.