[PATCH] LD: Use is_elf_hash_table to check for an ELF hash table

Maciej W. Rozycki macro@codesourcery.com
Mon Apr 29 16:15:00 GMT 2013


Hi,

 Here's a fix for the only place across the tree that checks for the hash 
table being ELF manually rather than with is_elf_hash_table.  No 
regressions across 139 targets (where I have now added tic6x-uclinux to my 
previous list).  OK to apply?

2013-04-29  Maciej W. Rozycki  <macro@codesourcery.com>

	ld/
	* emultempl/elf32.em (gld${EMULATION_NAME}_before_allocation):
	Use is_elf_hash_table rather than a handcoded condition.

  Maciej

binutils-ld-elf32-elf-hash.diff
Index: binutils-fsf-trunk-quilt/ld/emultempl/elf32.em
===================================================================
--- binutils-fsf-trunk-quilt.orig/ld/emultempl/elf32.em	2013-04-25 02:34:29.000000000 +0100
+++ binutils-fsf-trunk-quilt/ld/emultempl/elf32.em	2013-04-25 14:42:21.953228578 +0100
@@ -1480,7 +1480,7 @@ gld${EMULATION_NAME}_before_allocation (
   asection *sinterp;
   bfd *abfd;
 
-  if (link_info.hash->type == bfd_link_elf_hash_table)
+  if (is_elf_hash_table (link_info.hash))
     _bfd_elf_tls_setup (link_info.output_bfd, &link_info);
 
   /* If we are going to make any variable assignments, we need to let



More information about the Binutils mailing list