This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [patch] SymbianOS Arm executables
- From: Nick Clifton <nickc at redhat dot com>
- To: paul at codesourcery dot com
- Cc: binutils at sources dot redhat dot com
- Date: Fri, 11 Feb 2005 09:44:21 +0000
- Subject: Re: [patch] SymbianOS Arm executables
Hi 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
^^^^^^^^^
relocatable ?
> 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.
Approved - please apply. But...
------------------------------------------------------------------------
+ /* True if This target has relocatable executables, so needs dynamic
+ section symbols. */
+ bfd_boolean exec_reloc_p;
There is no need for a capital T on the word "This".
Also - this is a just personal thing, not a requirement - I really
hate the use of ..._p to indicate a boolean value. We are coding in C
here not lisp and I think that we should try to drop hold overs from
that language. Thus I would have called this variable:
"is_relocatable_executable" or
"executable_needs_dynamic_section_syms".
------------------------------------------------------------------------
/* When generating a shared object, these relocations are copied
into the output file to be resolved at run time. */
- if (info->shared
+ if ((info->shared || globals->root.exec_reloc_p)
Since you are updating the if() statement, you should update the
comment describing it.
Cheers
Nick