This is the mail archive of the binutils@sourceware.org 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]

[PATCH] 4/4 Additional Sections


From: Alex Bennee
Date: Mon, 19 Mar 2007 18:39:44 +0000
Subject: [PATCH] Added support for solaris sections

---
 bfd/elf-bfd.h |    9 +++++++++
 bfd/elf.c     |   18 ++++++++++++++++++
 2 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index 3fba1c2..cf3df1b 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -1254,11 +1254,17 @@ struct elf_obj_tdata
   Elf_Internal_Shdr dynversym_hdr;
   Elf_Internal_Shdr dynverref_hdr;
   Elf_Internal_Shdr dynverdef_hdr;
+  Elf_Internal_Shdr syminfo_shndx_hdr;
   Elf_Internal_Shdr symtab_shndx_hdr;
+  Elf_Internal_Shdr rsa_signature_hdr;
+  Elf_Internal_Shdr dtrace_dof_hdr;
   unsigned int symtab_section, shstrtab_section;
   unsigned int strtab_section, dynsymtab_section;
   unsigned int symtab_shndx_section;
+  unsigned int syminfo_shndx_section;
   unsigned int dynversym_section, dynverdef_section, dynverref_section;
+  unsigned int dtrace_dof_section;
+  unsigned int rsa_signature_section;
   file_ptr next_file_pos;
   bfd_vma gp;				/* The gp value */
   unsigned int gp_size;			/* The gp size */
@@ -1378,9 +1384,12 @@ struct elf_obj_tdata
 #define elf_onesymtab(bfd)	(elf_tdata(bfd) -> symtab_section)
 #define elf_symtab_shndx(bfd)	(elf_tdata(bfd) -> symtab_shndx_section)
 #define elf_dynsymtab(bfd)	(elf_tdata(bfd) -> dynsymtab_section)
+#define elf_dynsyminfo(bfd)	(elf_tdata(bfd) -> syminfo_shndx_section) 
 #define elf_dynversym(bfd)	(elf_tdata(bfd) -> dynversym_section)
 #define elf_dynverdef(bfd)	(elf_tdata(bfd) -> dynverdef_section)
 #define elf_dynverref(bfd)	(elf_tdata(bfd) -> dynverref_section)
+#define elf_dtracedof(bfd)	(elf_tdata(bfd) -> dtrace_dof_section)
+#define elf_rsasignature(bfd)	(elf_tdata(bfd) -> rsa_signature_section)
 #define elf_num_locals(bfd)	(elf_tdata(bfd) -> num_locals)
 #define elf_num_globals(bfd)	(elf_tdata(bfd) -> num_globals)
 #define elf_section_syms(bfd)	(elf_tdata(bfd) -> section_syms)
diff --git a/bfd/elf.c b/bfd/elf.c
index 9e48f66..ed23149 100644
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -2101,6 +2101,18 @@ bfd_section_from_shdr (bfd *abfd, unsign
       }
       break;
 
+    case SHT_GNU_dof:
+      elf_dtracedof (abfd) = shindex;
+      elf_tdata (abfd)->dtrace_dof_hdr = *hdr;
+      return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
shindex);
+      break;
+
+    case SHT_GNU_syminfo:
+      elf_dynsyminfo (abfd) = shindex;
+      elf_tdata (abfd)->syminfo_shndx_hdr = *hdr;
+      return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
shindex);
+      break;
+
     case SHT_GNU_verdef:
       elf_dynverdef (abfd) = shindex;
       elf_tdata (abfd)->dynverdef_hdr = *hdr;
@@ -2121,6 +2133,12 @@ bfd_section_from_shdr (bfd *abfd, unsign
       return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
shindex);
       break;
 
+    case SHT_GNU_signature:
+      elf_rsasignature (abfd) = shindex;
+      elf_tdata (abfd)->rsa_signature_hdr = *hdr;
+      return _bfd_elf_make_section_from_shdr (abfd, hdr, name,
shindex);
+      break;
+
     case SHT_SHLIB:
       return TRUE;
 
-- 
1.4.3.4


-- 
Alex, homepage: http://www.bennee.com/~alex/
Put your Nose to the Grindstone! -- Amalgamated Plastic Surgeons and
Toolmakers, Ltd.


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