This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Correct the type of _PROCEDURE_LINKAGE_TABLE_


I don't think this affects any current port, but I noticed it working on an
out-of-tree port: objdump will not dump the PLT as instructions if it starts
with an STT_OBJECT symbol.  OK?

-- 
Daniel Jacobowitz

2004-05-26  Daniel Jacobowitz  <dan@debian.org>

	* elflink.c (_bfd_elf_create_dynamic_sections): Create
	_PROCEDURE_LINKAGE_TABLE_ as STT_FUNC if it contains code.

Index: elflink.c
===================================================================
RCS file: /cvs/src/src/bfd/elflink.c,v
retrieving revision 1.69
diff -u -p -r1.69 elflink.c
--- elflink.c	11 May 2004 17:08:37 -0000	1.69
+++ elflink.c	26 May 2004 21:28:52 -0000
@@ -283,7 +283,10 @@ _bfd_elf_create_dynamic_sections (bfd *a
 	return FALSE;
       h = (struct elf_link_hash_entry *) bh;
       h->elf_link_hash_flags |= ELF_LINK_HASH_DEF_REGULAR;
-      h->type = STT_OBJECT;
+      if ((pltflags & SEC_CODE) == 0)
+	h->type = STT_OBJECT;
+      else
+	h->type = STT_FUNC;
 
       if (! info->executable
 	  && ! bfd_elf_link_record_dynamic_symbol (info, h))


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]