Skip to contentSkip to conversation

libgcc

parisc-linux [email protected] 2 participants 2 messages Feb 21, 2000 – Feb 22, 2000

lore
Share & tools
lore
#0 lore raw

I've committed some changes which should allow gcc to build libgcc.a. Compilation stops when trying to test libgcc:

Testing libgcc1. Ignore linker warning messages.
/mnt/home/willy/cvs/gcc-build/gcc/xgcc -B/mnt/home/willy/cvs/gcc-build/gcc/ -B/home/willy/gcc/hppa1.1-linux/bin/ -I/home/willy/gcc/hppa1.1-linux/include -DCROSS_COMPILE -DIN_GCC -DMULTIBYTE_CHARS=1 -g -O2 -I./include libgcc1-test.o -o libgcc1-test \
-nostartfiles -nostdlib /mnt/home/willy/cvs/gcc-build/gcc/xgcc -B/mnt/home/willy/cvs/gcc-build/gcc/ -B/home/willy/gcc/hppa1.1-linux/bin/ -I/home/willy/gcc/hppa1.1-linux/include --print-libgcc-file-name
libgcc1-test.o: In function `main_without__main':
/mnt/home/willy/cvs/gcc-build/gcc/../../gcc/gcc/libgcc1-test.c:20: undefined reference to `$global$'
collect2: ld returned 1 exit status

I don't see $global$ defined anywhere. Is this something which ld should be fixing-up and isn't?

#1 lore raw

Yes, the HP loader defines this symbol. It is used to access global symbols. If you are using ELF (GNU ld), this may not be defined. I few months ago I hacked the milli library to add this to libgcc.a. However, it really should be defined by the linker.

Dave

Quoted 20 lines

I've committed some changes which should allow gcc to build libgcc.a. Compilation stops when trying to test libgcc:

Testing libgcc1. Ignore linker warning messages.
/mnt/home/willy/cvs/gcc-build/gcc/xgcc -B/mnt/home/willy/cvs/gcc-build/gcc/ -B/home/willy/gcc/hppa1.1-linux/bin/ -I/home/willy/gcc/hppa1.1-linux/include -DCROSS_COMPILE -DIN_GCC -DMULTIBYTE_CHARS=1 -g -O2 -I./include libgcc1-test.o -o libgcc1-test \
-nostartfiles -nostdlib /mnt/home/willy/cvs/gcc-build/gcc/xgcc -B/mnt/home/willy/cvs/gcc-build/gcc/ -B/home/willy/gcc/hppa1.1-linux/bin/ -I/home/willy/gcc/hppa1.1-linux/include --print-libgcc-file-name
libgcc1-test.o: In function `main_without__main':
/mnt/home/willy/cvs/gcc-build/gcc/../../gcc/gcc/libgcc1-test.c:20: undefined reference to `$global$'
collect2: ld returned 1 exit status

I don't see $global$ defined anywhere. Is this something which ld should be fixing-up and isn't?

---------------------------------------------------------------------------
To unsubscribe: send e-mail to [email protected] with `unsubscribe' as the subject.

Signature · 2 lines
J. David Anglin                                  [email protected]
National Research Council of Canada              (613) 990-0752 (FAX: 952-6605)