This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
m68hc11 trampolines
- From: Alan Modra <amodra at gmail dot com>
- To: James Murray <jsm at jsm-net dot demon dot co dot uk>
- Cc: binutils at sourceware dot org
- Date: Thu, 9 Feb 2012 23:23:01 +1030
- Subject: m68hc11 trampolines
- References: <ADFB3A72-FDFA-4402-A6D5-CADEA94D0ED2@adacore.com> <1324230304.8652.3.camel@jsm2> <81013813-59AA-4061-8C6C-727D10F02149@adacore.com> <1324323896.8652.34.camel@jsm2> <1324389068.8652.70.camel@jsm2> <6273DF63-6E89-4A92-9FEF-52CFFE3E22C6@adacore.com> <1324392565.8652.73.camel@jsm2> <1325173546.2430.127.camel@jsm2> <1325211174.2430.145.camel@jsm2>
On Fri, Dec 30, 2011 at 02:12:54AM +0000, James Murray wrote:
> What does this mean and what needs doing to get the m68hc11 trampoline
> code back?
Try this.
Index: bfd/elf32-m68hc11.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc11.c,v
retrieving revision 1.40
diff -u -p -r1.40 elf32-m68hc11.c
--- bfd/elf32-m68hc11.c 25 Aug 2010 14:53:42 -0000 1.40
+++ bfd/elf32-m68hc11.c 9 Feb 2012 12:26:12 -0000
@@ -1302,6 +1302,7 @@ static const struct bfd_elf_special_sect
#define elf_backend_final_write_processing 0
#define elf_backend_can_gc_sections 1
#define elf_backend_special_sections elf32_m68hc11_special_sections
+#define elf_backend_merge_symbol_attribute elf32_m68hc11_merge_symbol_attribute
#define bfd_elf32_bfd_link_hash_table_create \
m68hc11_elf_bfd_link_hash_table_create
Index: bfd/elf32-m68hc12.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc12.c,v
retrieving revision 1.30
diff -u -p -r1.30 elf32-m68hc12.c
--- bfd/elf32-m68hc12.c 25 Aug 2010 14:53:42 -0000 1.30
+++ bfd/elf32-m68hc12.c 9 Feb 2012 12:26:12 -0000
@@ -581,6 +581,7 @@ static const struct bfd_elf_special_sect
#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
+#define elf_backend_merge_symbol_attribute elf32_m68hc11_merge_symbol_attribute
#define bfd_elf32_bfd_link_hash_table_create \
m68hc12_elf_bfd_link_hash_table_create
Index: bfd/elf32-m68hc1x.c
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc1x.c,v
retrieving revision 1.40
diff -u -p -r1.40 elf32-m68hc1x.c
--- bfd/elf32-m68hc1x.c 2 Jun 2011 13:43:14 -0000 1.40
+++ bfd/elf32-m68hc1x.c 9 Feb 2012 12:26:13 -0000
@@ -214,6 +214,20 @@ elf32_m68hc11_add_symbol_hook (bfd *abfd
return TRUE;
}
+/* Merge non-visibility st_other attributes, STO_M68HC12_FAR and
+ STO_M68HC12_INTERRUPT. */
+
+void
+elf32_m68hc11_merge_symbol_attribute (struct elf_link_hash_entry *h,
+ const Elf_Internal_Sym *isym,
+ bfd_boolean definition,
+ bfd_boolean dynamic ATTRIBUTE_UNUSED)
+{
+ if (definition)
+ h->other = ((isym->st_other & ~ELF_ST_VISIBILITY (-1))
+ | ELF_ST_VISIBILITY (h->other));
+}
+
/* External entry points for sizing and building linker stubs. */
/* Set up various things so that we can make a list of input sections
Index: bfd/elf32-m68hc1x.h
===================================================================
RCS file: /cvs/src/src/bfd/elf32-m68hc1x.h,v
retrieving revision 1.11
diff -u -p -r1.11 elf32-m68hc1x.h
--- bfd/elf32-m68hc1x.h 4 Feb 2010 09:16:39 -0000 1.11
+++ bfd/elf32-m68hc1x.h 9 Feb 2012 12:26:13 -0000
@@ -176,6 +176,10 @@ bfd_boolean elf32_m68hc11_add_symbol_hoo
flagword *flagsp, asection **secp,
bfd_vma *valp);
+void elf32_m68hc11_merge_symbol_attribute
+ (struct elf_link_hash_entry *, const Elf_Internal_Sym *,
+ bfd_boolean, bfd_boolean);
+
/* Tweak the OSABI field of the elf header. */
extern void elf32_m68hc11_post_process_headers (bfd*, struct bfd_link_info*);
--
Alan Modra
Australia Development Lab, IBM