summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Carrez <stcarrez@nerim.fr>2003-09-06 20:55:50 +0000
committerStephane Carrez <stcarrez@nerim.fr>2003-09-06 20:55:50 +0000
commit9c45410196b1e7d58b53659ac510e970863722f7 (patch)
tree26a8513695ce80f496872246b11b654e063a1dd5
parent520a04c2d4e3c8e4598c811a4b207bc284ef9c09 (diff)
downloadbinutils-redhat-9c45410196b1e7d58b53659ac510e970863722f7.tar.gz
* elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
(elf_backend_special_sections): Define.a PR savannah/4950: * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors section is read-only.
-rw-r--r--bfd/ChangeLog9
-rw-r--r--bfd/elf32-m68hc11.c4
-rw-r--r--bfd/elf32-m68hc12.c20
3 files changed, 31 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 7353bdd5cf..5b463bf61c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,12 @@
+2003-09-06 Stephane Carrez <stcarrez@nerim.fr>
+
+ * elf32-m68hc12.c (elf32_m68hc12_special_sections): New for hc11.
+ (elf_backend_special_sections): Define.a
+
+ PR savannah/4950:
+ * elf32-m68hc11.c (elf32_m68hc11_special_sections): The .vectors
+ section is read-only.
+
2003-09-04 Nick Clifton <nickc@redhat.com>
* archures.c (bfd_mach_v850e1): Define.
diff --git a/bfd/elf32-m68hc11.c b/bfd/elf32-m68hc11.c
index b9d9bfc312..2844b487a4 100644
--- a/bfd/elf32-m68hc11.c
+++ b/bfd/elf32-m68hc11.c
@@ -1285,7 +1285,7 @@ m68hc11_elf_relax_delete_bytes (abfd, sec, addr, count)
- The .page0 is a data section that is mapped in [0x0000..0x00FF].
Page0 accesses are faster on the M68HC11. Soft registers used by GCC-m6811
are located in .page0.
- - The .vectors is the data section that represents the interrupt
+ - The .vectors is the section that represents the interrupt
vectors. */
static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
{
@@ -1296,7 +1296,7 @@ static struct bfd_elf_special_section const elf32_m68hc11_special_sections[]=
{ ".page0", 0, NULL, 0,
SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
{ ".vectors", 0, NULL, 0,
- SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ SHT_PROGBITS, SHF_ALLOC },
{ NULL, 0, NULL, 0,
0, 0 }
};
diff --git a/bfd/elf32-m68hc12.c b/bfd/elf32-m68hc12.c
index 54fdca2827..3074935cc8 100644
--- a/bfd/elf32-m68hc12.c
+++ b/bfd/elf32-m68hc12.c
@@ -538,6 +538,25 @@ m68hc12_elf_set_mach_from_flags (abfd)
return TRUE;
}
+/* Specific sections:
+ - The .page0 is a data section that is mapped in [0x0000..0x00FF].
+ Page0 accesses are faster on the M68HC12.
+ - The .vectors is the section that represents the interrupt
+ vectors. */
+static struct bfd_elf_special_section const elf32_m68hc12_special_sections[]=
+{
+ { ".eeprom", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".softregs", 0, NULL, 0,
+ SHT_NOBITS, SHF_ALLOC + SHF_WRITE },
+ { ".page0", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC + SHF_WRITE },
+ { ".vectors", 0, NULL, 0,
+ SHT_PROGBITS, SHF_ALLOC },
+ { NULL, 0, NULL, 0,
+ 0, 0 }
+};
+
#define ELF_ARCH bfd_arch_m68hc12
#define ELF_MACHINE_CODE EM_68HC12
#define ELF_MAXPAGESIZE 0x1000
@@ -554,6 +573,7 @@ m68hc12_elf_set_mach_from_flags (abfd)
#define elf_backend_object_p m68hc12_elf_set_mach_from_flags
#define elf_backend_final_write_processing 0
#define elf_backend_can_gc_sections 1
+#define elf_backend_special_sections elf32_m68hc12_special_sections
#define elf_backend_post_process_headers elf32_m68hc11_post_process_headers
#define elf_backend_add_symbol_hook elf32_m68hc11_add_symbol_hook