Incompatibility of PIC and non-PIC
Sat, 19 Aug 2000 15:29:56 +1000 (EST)
On 18 Aug 2000, David Huggins-Daines wrote:
> David Huggins-Daines <firstname.lastname@example.org> writes:
> > Alan Modra <email@example.com> writes:
> > > A bit of head-scratching, a couple of added functions, and the linker now
> > > detects PIC functions and handles them appropriately.
> > Sorry to burst your bubble but this doesn't work in the real world,
> > where "real world" is defined as 'hppa-linux-gcc -o hello hello.c'
In some ways not having any hardware to run hppa-linux binaries on is
good, as it gives me some excuse. :-)
Let me know how this one goes.
2000-08-19 Alan Modra <firstname.lastname@example.org>
* elf32-hppa.c (hppa_setup_plt_PIC_call): Move function into..
(elf32_hppa_build_stubs): Don't call it.
(elf32_hppa_create_dynamic_sections): Don't try to create the .plt
and .got twice.
(elf32_hppa_adjust_dynamic_symbol): Handle pic_call here. Don't
make symbol dynamic, and don't emit a reloc if pic_call.
(hppa_handle_PIC_calls): Simplify as we..
(elf32_hppa_size_dynamic_sections): ..only call hppa_handle_PIC_calls
when not shared. Don't create DT_PLTREL etc. entries unless we
have a .rela.plt section.
(elf32_hppa_finish_dynamic_symbol): Set up .plt entries with final
relocated values when it's for a pic_call function we include in
the link. Don't create relocs for pic_call either.
2000-08-18 David Huggins-Daines <email@example.com>
* elf32-hppa.c (final_link_relocate): Look for an import stub in
the case of statically linked PIC symbols.
Linuxcare. Support for the Revolution.