PATCH: Add hdynamic to elf_link_hash_table
Michael Eager
eager@eagerm.com
Sat Sep 1 15:45:00 GMT 2012
On 09/01/2012 08:04 AM, H.J. Lu wrote:
> Hi,
>
> This patch adds hdynamic to elf_link_hash_table so that we can check
> a pointer instead of calling strcmp. OK to install?
>
> Thanks.
>
> H.J.
> ---
> * elf32-microblaze.c (microblaze_elf_finish_dynamic_symbol): Check
> hdynamic, hgot, hplt instead of _DYNAMIC, _GLOBAL_OFFSET_TABLE_,
> _PROCEDURE_LINKAGE_TABLE_.
> diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c
> index 27b569e..c000424 100644
> --- a/bfd/elf32-microblaze.c
> +++ b/bfd/elf32-microblaze.c
> @@ -2882,9 +2882,9 @@ microblaze_elf_finish_dynamic_symbol (bfd *output_bfd,
> }
>
> /* Mark some specially defined symbols as absolute. */
> - if (strcmp (h->root.root.string, "_DYNAMIC") == 0
> - || strcmp (h->root.root.string, "_GLOBAL_OFFSET_TABLE_") == 0
> - || strcmp (h->root.root.string, "_PROCEDURE_LINKAGE_TABLE_") == 0)
> + if (h == htab->elf.hdynamic
> + || h == htab->elf.hgot
> + || h == htab->elf.hplt)
> sym->st_shndx = SHN_ABS;
>
> return TRUE;
OK for MicroBlaze.
--
Michael Eager eager@eagercon.com
1960 Park Blvd., Palo Alto, CA 94306 650-325-8077
More information about the Binutils
mailing list