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]

hppa64 and millicode symbols.


This one allows elf64-hppa to set elf symbol type for millicode functions
(via .type or .export).  Identical code has existed for some time in
elf32-hppa.  Yes, I know it should be merged...

bfd/ChangeLog
	* elf64-hppa.c (elf64_hppa_elf_get_symbol_type): New function.
	(elf_backend_get_symbol_type): Define.

Committing to mainline and branch.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.

Index: bfd/elf64-hppa.c
===================================================================
RCS file: /cvs/src/src/bfd/elf64-hppa.c,v
retrieving revision 1.10
diff -u -p -r1.10 elf64-hppa.c
--- elf64-hppa.c	2001/01/14 11:12:52	1.10
+++ elf64-hppa.c	2001/01/30 12:43:44
@@ -258,6 +258,9 @@ static boolean get_dlt
 static boolean get_stub
   PARAMS ((bfd *, struct bfd_link_info *, struct elf64_hppa_link_hash_table *));
 
+static int elf64_hppa_elf_get_symbol_type
+  PARAMS ((Elf_Internal_Sym *, int));
+
 static boolean
 elf64_hppa_dyn_hash_table_init (ht, abfd, new)
      struct elf64_hppa_dyn_hash_table *ht;
@@ -2569,6 +2585,19 @@ elf64_hppa_modify_segment_map (abfd)
   return true;
 }
 
+/* Called when writing out an object file to decide the type of a
+   symbol.  */
+static int
+elf64_hppa_elf_get_symbol_type (elf_sym, type)
+     Elf_Internal_Sym *elf_sym;
+     int type;
+{
+  if (ELF_ST_TYPE (elf_sym->st_info) == STT_PARISC_MILLI)
+    return STT_PARISC_MILLI;
+  else
+    return type;
+}
+
 /* The hash bucket size is the standard one, namely 4.  */
 
 const struct elf_size_info hppa64_elf_size_info =
@@ -2662,6 +2691,7 @@ const struct elf_size_info hppa64_elf_si
 #define elf_backend_got_header_size     0
 #define elf_backend_plt_header_size     0
 #define elf_backend_type_change_ok true
+#define elf_backend_get_symbol_type	     elf64_hppa_elf_get_symbol_type
 
 #include "elf64-target.h"
 


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