Port-powerpc archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: powerpc64 rescue/rescue link failures
In article <A07C6640-1AE4-4E39-BC06-14C293F6E922%gmail.com@localhost>,
Dennis Ferguson <dennis.c.ferguson%gmail.com@localhost> wrote:
>-=-=-=-=-=-
>
>Since the January 2 fix to the powerpc64 loader to properly
>complain about this the macppc64 build has been failing
>while linking rescue/rescue, this way:
>
># link rescue/rescue
>[...]
>/build/macppc64/obj/tooldir.NetBSD-7.99.3-amd64/lib/gcc/powerpc64--netbsd/4.8.4/../../../../powerpc64--netbsd/bin/ld:
>(.text+0xc): call to `.__cerror' lacks nop, can't restore toc;
>(-mcmodel=small toc adjust
>stub)/build/macppc64/obj/tooldir.NetBSD-7.99.3-amd64/lib/gcc/powerpc64--netbsd/4.8.4/../../../../powerpc64--netbsd/bin/ld: final link failed: Bad value
>
>The problem is with the tail call to __cerror() which each
>system call stub does (despite what the error message says).
>
>I can fix this by brute force with the attached patch, which
>inlines __cerror() everywhere it is used, but I was wondering
>if there was a better way. I see .hidden sometimes being used
>for this but I have no idea if, or how, that might help this
>case.
The way this has been done so far is similar, basically giving each
library with syscall stubs its own copy of cerror...
find /usr/src/lib -name Makefile\* -exec grep cerror {} +
/usr/src/lib/libc/sys/Makefile.inc: syscall.S __syscall.S __clone.S cerror.S
/usr/src/lib/libposix/sys/Makefile.inc:SRCS+= cerror.S
/usr/src/lib/libposix/sys/Makefile.inc:CPPFLAGS+= -D__cerror=__posix_cerror -I${LIBCDIR} -D_REENTRANT
/usr/src/lib/librt/sys/Makefile.inc:SRCS+= cerror.S
/usr/src/lib/librt/sys/Makefile.inc:CPPFLAGS+= -D__cerror=__rt_cerror -I${LIBCDIR} -D_REENTRANT
I don't know what the right solution is... Also libc/shlib_version says:
# - make __cerror (spelled CERROR) hidden again
christos
Home |
Main Index |
Thread Index |
Old Index