[patch] SymbianOS Arm executables
Paul Brook
paul@codesourcery.com
Thu Feb 10 17:29:00 GMT 2005
On Thursday 10 February 2005 10:55, Richard Earnshaw wrote:
> I'm uncomfortable about the way globals->symbian_p is getting scattered
> throughout the entire linking process. I think we really need to try
> and distill that variable into the effects it has on linking (this would
> then make porting the linker to platforms with similar properties much
> less painful).
>
> In this case you've already identified the abstract property: the
> executable is relocated at link time. Most of your used of ->symbian_p
> should therefore be ->exec_reloc_p. There should then be exactly one
> place where symbian_p is tested, and that is then used to set the
> exec_reloc_p property.
Modified patch attached. No functional changes.
Retested on i686-linux, arm-none-elf and arm-none-symbianelf.
Ok?
Paul
2005-02-10 Paul Brook <paul@codesourcery.com>
* elf-bfd.h (struct elf_link_hash_table): Add exec_reloc_p.
* elf.c (_bfd_elf_link_hash_table_init): Initialize it.
* elflink.c (bfd_elf_link_record_dynamic_symbol): Create local dynamic
symbols in relocatable executables.
(bfd_elf_record_link_assignment): Create dynamic section symbols in
relocatable executables.
(_bfd_elf_link_renumber_dynsyms): Ditto.
(bfd_elf_final_link): Ditto.
* elf32-arm.c (elf32_arm_final_link_relocate): Copy absolute
relocations into relocatable executables.
(elf32_arm_check_relocs): Crate dynamic sections for relocatale
executables. Also copy absolute relocations.
(elf32_arm_adjust_dynamic_symbol): Don't create copy relocations
in relocatable executables.
(allocate_dynrelocs): Copy relocations for relocatable executables.
Output dynamic symbols for symbols defined in linker scripts.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch.symbian_exec
Type: text/x-diff
Size: 7376 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20050210/797272ad/attachment.bin>
More information about the Binutils
mailing list