public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* Special names tha ld needs to recognize for hppa64-hp-hpux11.X
@ 2002-01-22 11:34 John David Anglin
  2002-01-22 12:10 ` DJ Delorie
  2002-01-22 13:39 ` law
  0 siblings, 2 replies; 24+ messages in thread
From: John David Anglin @ 2002-01-22 11:34 UTC (permalink / raw)
  To: binutils

In looking at the gcc testresults for hppa64-hp-hpux11.00, I noticed that
there is a problem with linking using binutils ld when "-static" was
specified.  You get the following error:

Executing on host: /xxx/gnu/gcc-3.1/objdir/gcc/xgcc -B/xxx/gnu/gcc-3.1/objdir/gc
c/ /xxx/gnu/gcc-3.1/gcc/gcc/testsuite/gcc.dg/special/gcsec-1.c  -ffunction-secti
ons -fdata-sections -Wl,--gc-sections -static   -lm   -o ./a.out    (timeout = 3
00)
/usr/lib/pa20_64/libc.a(static_vars.o)(.sdata+0x0): undefined reference to `__sy
stab'

Linking the same program with "cc +DA2.0W -Ae -noshared", I find the following
symbols from crt0.o and libc.a appear to have received special treatment:

# /usr/bin/nm a.out|grep ABS
[1164]   |                     0|       0|NOTYP|GLOB |0|     ABS|_FPU_STATUS
[1096]   |                     0|       0|NOTYP|GLOB |0|     ABS|__ARGC
[1097]   |                     0|       0|NOTYP|GLOB |0|     ABS|__ARGV
[852]    |                     0|       0|NOTYP|GLOB |0|     ABS|__CPU_KEYBITS_1
[1161]   |                     0|       0|NOTYP|GLOB |0|     ABS|__CPU_REVISION
[1142]   |                     0|       0|NOTYP|GLOB |0|     ABS|__ENVP
[757]    |                     0|       0|NOTYP|GLOB |0|     ABS|__FPU_MODEL
[1160]   |                     0|       0|NOTYP|GLOB |0|     ABS|__FPU_REVISION
[991]    |                     0|       0|NOTYP|GLOB |0|     ABS|__LOAD_INFO
[804]    |                   532|       0|NOTYP|GLOB |0|     ABS|__SYSTEM_ID
[1080]   |                     0|       0|NOTYP|GLOB |0|     ABS|__SYSTEM_ID_D
[909]    |                   200|       0|NOTYP|GLOB |0|     ABS|__TLS_SIZE
[969]    |                     0|       0|NOTYP|GLOB |0|     ABS|__TLS_SIZE_D
[1008]   |                     0|       0|NOTYP|GLOB |0|     ABS|__libdl_jmp_tbl
[699]    |                     0|       0|NOTYP|GLOB |0|     ABS|__systab
[938]    |   9223372041149791520|       0|NOTYP|GLOB |0|     ABS|_end

In crt0.o and libc.a, these are "UNDEF GLOBAL OBJECT" or
"DEFINED GLOBAL OBJECT".

The special symbols documented by the linker man page are:

_end: first address beyond the end of the program's address space.
_edata: first address beyond the initialized data.
_etext: first address beyond the program text.
end, edata and etext: defined if referred to in the program.
__TLS_SIZE: total thread local storage size.
_FPU_STATUS: initial status of the FPU status register.
__SYSTEM_ID: largest architecture revision level used by any compilation unit.

A user definition of any of these symbols is treated as an error.

Does anyone have any suggestions on how to best handle the definition
of these special symbols in ld?  I am guessing that "_end" and related
symbols must already be handled because that's pretty standard.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)

^ permalink raw reply	[flat|nested] 24+ messages in thread
[parent not found: <no.id>]
[parent not found: <200202111958.g1BJwRAQ022031@hiauly1.hia.nrc.ca>]

end of thread, other threads:[~2002-03-05 17:57 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-22 11:34 Special names tha ld needs to recognize for hppa64-hp-hpux11.X John David Anglin
2002-01-22 12:10 ` DJ Delorie
2002-01-22 13:39 ` law
2002-01-22 13:58   ` John David Anglin
2002-02-07 14:10   ` John David Anglin
2002-02-08 17:55     ` amodra
2002-02-08 15:27   ` John David Anglin
2002-02-11  9:27     ` law
2002-02-11 10:07       ` John David Anglin
2002-02-11 13:48         ` law
2002-02-12 14:53           ` John David Anglin
     [not found] <no.id>
2002-02-09 17:47 ` John David Anglin
2002-02-12 16:14 ` John David Anglin
2002-02-12 17:38   ` law
2002-02-26 15:20     ` John David Anglin
2002-02-26 21:58       ` Alan Modra
2002-02-27  0:32         ` John David Anglin
2002-03-05  9:57       ` law
     [not found] <200202111958.g1BJwRAQ022031@hiauly1.hia.nrc.ca>
2002-02-11 15:35 ` law
2002-02-11 18:40   ` John David Anglin
2002-02-12 11:01     ` law
2002-02-12 11:07       ` John David Anglin
2002-02-12 13:19         ` law
2002-02-12 14:09           ` John David Anglin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).