This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [rfc] Fix mst_solib_trampoline symbol sections for PLT stubs
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 31 Oct 2007 20:12:13 +0100 (CET)
- Subject: Re: [rfc] Fix mst_solib_trampoline symbol sections for PLT stubs
Daniel Jacobowitz wrote:
> Interesting. On most platforms, that's not necessary: LD only needs
> to set a canonical address in the executable's symtab if the
> executable takes the function's address, so this should only happen if
> those non-PIC calls were indistinguishable from taking the address.
>
> That's not implemented for PowerPC. I don't know if it's an ABI
> requirement or just a missing optimization. Search for "st_value = 0"
> in elf32-ppc.c versus elf32-i386.c.
Interesting indeed; on s390 it looks yet again different. I don't know
why this is handled so differently across platforms ...
> So, this won't help everywhere or fix the root cause, but it does seem
> like it would work for PowerPC.
OK, I've committed the patch now. Whenever we do have the canonical
address hint in the undef symbol, we should use it (and the patch
fixes that in any case). On platforms where we don't have those hints,
some other method needs to work (e.g. synthetic symtab).
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com