Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 336914

Summary: sys-libs/glibc-2.11.2 +hardened fails on ARM
Product: Gentoo Linux Reporter: David Lamparter <equinox-gentoo>
Component: [OLD] Core systemAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: normal CC: arm, armin76, dark, hardened
Priority: High    
Version: unspecified   
Hardware: ARM   
OS: Linux   
URL: http://sourceware.org/ml/libc-ports/2011-09/msg00018.html
See Also: https://bugs.gentoo.org/show_bug.cgi?id=558636
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: glibc 2.11.2 hardened patch for ARM

Description David Lamparter 2010-09-12 13:37:37 UTC
with +hardened:

make[4]: Leaving directory `/var/tmp/paludis/sys-libs-glibc-2.11.2/work/glibc-2.11.2/stdlib'
armv5te-softfloat-linux-gnueabi-gcc -nostdlib -nostartfiles -static -o /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/elf/sln  -Wl,-O1  /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/csu/Scrt1.o /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/csu/crti.o `armv5te-softfloat-linux-gnueabi-gcc --print-file-name=crtbeginS.o` /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/elf/sln.o  /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/libc.a -lgcc -lgcc_eh   /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/libc.a `armv5te-softfloat-linux-gnueabi-gcc --print-file-name=crtendS.o` /var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/csu/crtn.o
make[4]: Leaving directory `/var/tmp/paludis/sys-libs-glibc-2.11.2/work/glibc-2.11.2/time'
/var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/libc.a(setjmp.o): In function `Lrtld_global_ro':
(.text+0x58): undefined reference to `_rtld_global_ro'
/var/tmp/paludis/sys-libs-glibc-2.11.2/work/build-default-armv5te-softfloat-linux-gnueabi-nptl/libc.a(__longjmp.o): In function `Lrtld_global_ro':
(.text+0x60): undefined reference to `_rtld_global_ro'
collect2: ld returned 1 exit status

flags:
* sys-libs/glibc::gentoo (previously ::unpackaged) :2.2 [N 2.11.2] <target>
    -debug -gd -glibc-omitfp (hardened) (-multilib) nls -profile (-selinux) -vanilla build_options: -optional_tests -trace -preserve_work
    "GNU libc6 (also called glibc2) C library"
gcc version 4.4.4 (Gentoo Hardened 4.4.4-r1 p1.1, pie-0.4.5)

patch follows.
Comment 1 David Lamparter 2010-09-12 13:38:44 UTC
Created attachment 246961 [details, diff]
glibc 2.11.2 hardened patch for ARM
Comment 2 SpanKY gentoo-dev 2010-09-14 13:59:57 UTC
*** Bug 332945 has been marked as a duplicate of this bug. ***
Comment 3 Raúl Porcel (RETIRED) gentoo-dev 2010-09-24 11:17:18 UTC
Are you crosscompiling?
Comment 4 David Lamparter 2010-09-24 12:46:33 UTC
(In reply to comment #3)
> Are you crosscompiling?

I first encountered the bug on cross-compiling. Then I recompiled glibc directly on the target system, and the same thing happened.

Attached patch fixes this both for cross- and non-cross.



Comment 5 Magnus Granberg gentoo-dev 2010-09-24 15:06:16 UTC
Can you past the buildlog?
Comment 6 SpanKY gentoo-dev 2010-09-30 00:03:25 UTC
patch looks good to me.  added to 2.11.2 and 2.12.1 patchsets.  thanks !
Comment 7 SpanKY gentoo-dev 2012-08-12 06:22:21 UTC
btw, this patch isn't entirely correct, but i don't have the energy to fix it up.  if someone feels like it, please read the referenced thread and post an update.
Comment 8 SpanKY gentoo-dev 2015-09-18 17:11:55 UTC
and it's merged into mainline finally :)
https://sourceware.org/git/?p=glibc.git;a=commit;h=3ee578690f35942f41926cc2d98e25b3d0d08c71