Date: Thu, 20 Nov 2014 08:14:24 +0200 From: Timo Teras <timo.teras@....fi> To: Isaac Dunham <ibid.ag@...il.com> Cc: musl@...ts.openwall.com Subject: Re: webkitfltk segfaults in do_relocs On Wed, 19 Nov 2014 14:43:40 -0800 Isaac Dunham <ibid.ag@...il.com> wrote: > On Wed, Nov 19, 2014 at 03:56:35PM -0500, Rich Felker wrote: > > Got it. The line number in your original report seems to be off by a > > bit (it points to TLSDESC related cases) but I've found the > > offending relocation(s): > > > > 0083deea 0000c402 R_386_PC32 00000000 exp > > 0083df03 00010a02 R_386_PC32 00000000 log > > 0083df1c 00030502 R_386_PC32 00000000 floor > > 0083df35 00024502 R_386_PC32 00000000 ceil > > > > I have no idea why the linker is emitting these. It should have > > resolved them at ld time to PLT entries in the main program's PLT, > > but maybe since you're building as PIE (this is defautl on Alpine) > > that doesn't happen (this would be a linker bug, IMO). If it were > > going to do this (leave the relocations in the output), it should > > mark the program as DT_TEXTREL (having textrels), but this is > > probably suppressed for PIE because it's not supposed to happen. See also the following link on how to figure out where textrels come from: http://wiki.gentoo.org/wiki/Hardened/HOWTO_locate_and_fix_textrels > > My best guess as to what's triggering the problem is that there's > > some nasty asm or other hacks that are not PIE-compatible somewhere > > in the program. It's also possible that you're pulling in static > > libraries (which would not be PIE-compatible) due to not having the > > dynamic version of a needed library installed. > > All external libs are available in shared format, except perhaps -lgcc > But the whole library is built in static form only, without -fPIC. You need -fPIC for PIE-linking. Missing -fPIC is likely cause for this. If there's some weird reason to not use -fPIC, you probably also need to link the executable with -fno-PIE, but this means the main DSO will not be included in address space layout randomization. /Timo
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.