[klibc] [PATCH] do not use -R on ppc to link shared objects

Olaf Hering olh at suse.de
Thu Nov 27 23:04:10 PST 2003


 On Thu, Nov 27, H. Peter Anvin wrote:

> Olaf Hering wrote:
> >The *.shared targets require -shared on powerpc, and -R leads to linker
> >errors.
> >This patch makes the -R an arch define. ia64 at least requires -R.
> 
> Hmmm... *both* of those sounds like linker bugs.  Unless there is a 
> specific reason for it I'd rather try to get binutils fixed.  I'm not 
> sure what consequences -shared has, and in *particular* what 
> consequences it will have in future linker versions.

I guess the root cause is this, unmodified ppc32 build:

make[1]: Entering directory `/tmp/xx/klibc-0.87/klibc'
ld   -o libc.so \
crt0.o __shared_init.o vsnprintf.o snprintf.o vsprintf.o sprintf.o vsscanf.o sscanf.o ctypes.o strntoumax.o strntoimax.o atoi.o atol.o atoll.o strtol.o strtoll.o strtoul.o strtoull.o strtoimax.o strtoumax.o globals.o exitc.o atexit.o onexit.o execl.o execle.o execv.o execvpe.o execvp.o execlp.o execlpe.o fork.o wait.o wait3.o waitpid.o system.o setpgrp.o printf.o vprintf.o fprintf.o vfprintf.o perror.o fopen.o fread.o fread2.o fgetc.o fgets.o fwrite.o fwrite2.o fputc.o fputs.o puts.o sleep.o usleep.o raise.o abort.o assert.o alarm.o pause.o __signal.o signal.o bsd_signal.o siglist.o siglongjmp.o sigaction.o sigpending.o sigprocmask.o sigsuspend.o brk.o sbrk.o malloc.o realloc.o calloc.o mmap.o memcpy.o memcmp.o memset.o memccpy.o memmem.o memswap.o memmove.o strcasecmp.o strncasecmp.o strndup.o strerror.o strcat.o strchr.o strcmp.o strcpy.o strdup.o strlen.o strncat.o strstr.o strncmp.o strncpy.o strrchr.o strspn.o strsep.o strtok.o gethostname.o getdomainname.o getcwd.o seteuid.o setegid.o setresuid.o setresgid.o getenv.o setenv.o unsetenv.o getopt.o readdir.o syslog.o closelog.o pty.o isatty.o reboot.o time.o utime.o fdatasync.o llseek.o select.o nice.o getpriority.o qsort.o lrand48.o srand48.o seed48.o inet/inet_ntoa.o inet/inet_aton.o inet/inet_addr.o inet/inet_ntop.o inet/inet_pton.o inet/bindresvport.o send.o recv.o arch/ppc/setjmp.o \
        syscalls/*.o socketcalls/*.o \
        /usr/lib/gcc-lib/powerpc-suse-linux/3.2.2/libgcc.a
crt0.o: In function `_start':
crt0.o(.text+0x24): undefined reference to `main'
crt0.o(.text+0x24): relocation truncated to fit: R_PPC_REL24 main
make[1]: *** [libc.so] Error 1
make[1]: Leaving directory `/tmp/xx/klibc-0.87/klibc'
make: *** [all] Error 2


-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG



More information about the klibc mailing list