aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-v850.c
diff options
context:
space:
mode:
authorH.J. Lu <hjl.tools@gmail.com>2003-07-25 14:35:56 +0000
committerH.J. Lu <hjl.tools@gmail.com>2003-07-25 14:35:56 +0000
commit2f89ff8d8ead0e6eb034d7c26470be4eac7c3185 (patch)
treedeecbf5e1012acc2b9492ad093cde8236a3404e6 /bfd/elf32-v850.c
parent20650579793e339d3438ee509c464a253d7ef079 (diff)
downloadgdb-2f89ff8d8ead0e6eb034d7c26470be4eac7c3185.zip
gdb-2f89ff8d8ead0e6eb034d7c26470be4eac7c3185.tar.gz
gdb-2f89ff8d8ead0e6eb034d7c26470be4eac7c3185.tar.bz2
bfd/
2003-07-25 H.J. Lu <hongjiu.lu@intel.com> * elf-bfd.h (bfd_elf_special_section): New. (elf_backend_data): Add special_sections, a pointer to bfd_elf_special_section. (elf_section_type). New. (elf_section_flags): New. (_bfd_elf_get_sec_type_attr): New. * elf.c (_bfd_elf_make_section_from_shdr): Always use the real section type/flags. (special_sections): New. (get_special_section): New. (_bfd_elf_get_sec_type_attr): New. (_bfd_elf_new_section_hook): Check special_section to set elf_section_type and elf_section_flags. (elf_fake_sections): Don't use section name to set ELF section data. * elf32-m32r.c (m32r_elf_special_sections): New. (elf_backend_special_sections): Defined. * elf32-m68hc11.c (elf32_m68hc11_special_sections): New. (elf_backend_special_sections): Defined. * elf32-mcore.c (mcore_elf_special_sections): New. (elf_backend_special_sections): Defined. * elf32-ppc.c (ppc_elf_special_sections): New. (elf_backend_special_sections): Defined. * elf32-sh64.c (sh64_elf_special_sections): New. (elf_backend_special_sections): Defined. * elf32-v850.c (v850_elf_special_sections): New. (elf_backend_special_sections): Defined. * elf32-xtensa.c (elf_xtensa_special_sections): New. (elf_backend_special_sections): Defined. * elf64-alpha.c (elf64_alpha_special_sections): New. (elf_backend_special_sections): Defined. * elf64-hppa.c (elf64_hppa_special_sections): New. (elf_backend_special_sections): Defined. * elf64-ppc.c (ppc64_elf_special_sections): New. (elf_backend_special_sections): Defined. * elf64-sh64.c (sh64_elf64_special_sections): New. (elf_backend_special_sections): Defined. * elfxx-ia64.c (elfNN_ia64_special_sections): New. (elf_backend_special_sections): Defined. * elfxx-mips.c (_bfd_mips_elf_special_sections): New. * elfxx-mips.h (_bfd_mips_elf_special_sections): New. (elf_backend_special_sections): Defined. * elfxx-target.h (elf_backend_special_sections): New. Default to NULL. (elfNN_bed): Initialize special_sections. * section.c (bfd_abs_section): Remove const. (bfd_und_section): Likewise. (bfd_com_section): Likewise. (bfd_ind_section): Likewise. gas/ 2003-07-25 H.J. Lu <hongjiu.lu@intel.com> * config/obj-elf.c (special_sections): Removed. (obj_elf_change_section): Call _bfd_elf_get_sec_type_attr. Set elf_section_type and elf_section_flags. (elf_frob_file): Set SHT_GROUP. * config/obj-elf.h (obj_sec_set_private_data): New. * config/tc-alpha.h (ELF_TC_SPECIAL_SECTIONS): Removed. * config/tc-ia64.h: Likewise. * config/tc-m32r.h: Likewise. * config/tc-m68hc11.h: Likewise. * config/tc-mcore.h: Likewise. * config/tc-mips.h: Likewise. * config/tc-ppc.h: Likewise. * config/tc-sh64.h: Likewise. * config/tc-v850.h: Likewise. * config/tc-xtensa.h: Likewise. * config/tc-v850.h (SHF_V850_GPREL): Removed. (SHF_V850_EPREL): Likewise. (SHF_V850_R0REL): Likewise. * subsegs.c (subseg_get): Call obj_sec_set_private_data if it is defined. include/elf/ 2003-07-25 H.J. Lu <hongjiu.lu@intel.com> * v850.h (SHF_V850_GPREL): New. (SHF_V850_EPREL): Likewise. (SHF_V850_R0REL): Likewise.
Diffstat (limited to 'bfd/elf32-v850.c')
-rw-r--r--bfd/elf32-v850.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c
index e41d0c0..8437c3d 100644
--- a/bfd/elf32-v850.c
+++ b/bfd/elf32-v850.c
@@ -3139,6 +3139,38 @@ v850_elf_relax_section (abfd, sec, link_info, again)
result = FALSE;
goto finish;
}
+
+static struct bfd_elf_special_section const v850_elf_special_sections[]=
+{
+ { ".sdata", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
+ { ".rosdata", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_V850_GPREL },
+ { ".sbss", 0, NULL, 0,
+ SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
+ { ".scommon", 0, NULL, 0,
+ SHT_V850_SCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_GPREL },
+ { ".tdata", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
+ { ".tbss", 0, NULL, 0,
+ SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_EPREL },
+ { ".tcommon", 0, NULL, 0,
+ SHT_V850_TCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+ { ".zdata", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+ { ".rozdata", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_V850_R0REL },
+ { ".zbss", 0, NULL, 0,
+ SHT_NOBITS, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+ { ".zcommon", 0, NULL, 0,
+ SHT_V850_ZCOMMON, SHF_ALLOC + SHF_WRITE + SHF_V850_R0REL },
+ { ".call_table_data", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".call_table_text", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE + SHF_EXECINSTR },
+ { NULL, 0, NULL, 0,
+ 0, 0 }
+};
#define TARGET_LITTLE_SYM bfd_elf32_v850_vec
#define TARGET_LITTLE_NAME "elf32-v850"
@@ -3162,6 +3194,7 @@ v850_elf_relax_section (abfd, sec, link_info, again)
#define elf_backend_fake_sections v850_elf_fake_sections
#define elf_backend_gc_mark_hook v850_elf_gc_mark_hook
#define elf_backend_gc_sweep_hook v850_elf_gc_sweep_hook
+#define elf_backend_special_sections v850_elf_special_sections
#define elf_backend_can_gc_sections 1
#define elf_backend_rela_normal 1