This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/7065] Support building glibc with -fstack-protector or -fstack-protector-all
- From: "rsa at us dot ibm dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: 10 Dec 2008 17:09:11 -0000
- Subject: [Bug libc/7065] Support building glibc with -fstack-protector or -fstack-protector-all
- References: <20081204003831.7065.nix@esperi.org.uk>
- Reply-to: sourceware-bugzilla at sourceware dot org
------- Additional Comments From rsa at us dot ibm dot com 2008-12-10 17:09 -------
Nix
A failure in elf/check-localplt.out as indicated by a new symbol in
scripts/data/localplt-i386-linux-gnu.data means that libc proper is invoking the
new symbol via the plt when in-fact it should be making a direct invocation to a
libc internal symbol. There are very few conditions under which this is allowed
(notably those cases where we allow libc functionality to be overridden).
I've looked through the code and it appears that the sunrpc code is the only
relevant code which uses __bzero. I don't think there's an internal hidden
version of the symbol. So these calls to __bzero probably shouldn't be there.
Instead, they should use memset. Or perhaps that patch which you're using uses
__bzero?
In order to verify, one can look at the symbol table:
objdump -DR libc.so > libc.dis
Search libc.dis for:
__bzero@plt
You should see a plt call stub, e.g.
00016198 <__bzero@plt>:
16198: ff a3 0c 00 00 00 jmp *0xc(%ebx)
1619e: 68 00 00 00 00 push $0x0
161a3: e9 e0 ff ff ff jmp 16188 <h_errno+0x16168>
Now search for: "call 16198"
call 16198 <__bzero@plt>
This should bring you to the disassembly of the function which invoked __bzero
via the PLT. You can then go into the C source file and replace this with a
memset. Do this for all calls to the address for __bzero.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=7065
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.