aboutsummaryrefslogtreecommitdiff
path: root/bfd/elf32-m68hc1x.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2012-02-13 02:29:51 +0000
committerAlan Modra <amodra@gmail.com>2012-02-13 02:29:51 +0000
commit5efbbc4340d2cb348265e44627b71d7a37d8246c (patch)
treec7e2a3b8f97bd114431bed424dd3d13d40a5e54b /bfd/elf32-m68hc1x.c
parentd5ded7aab1b95fc27cc3a9f345c99624eeea5fd8 (diff)
downloadgdb-5efbbc4340d2cb348265e44627b71d7a37d8246c.zip
gdb-5efbbc4340d2cb348265e44627b71d7a37d8246c.tar.gz
gdb-5efbbc4340d2cb348265e44627b71d7a37d8246c.tar.bz2
* elf32-m68hc1x.c (elf32_m68hc11_merge_symbol_attribute): New function.
* elf32-m68hc1x.h (elf32_m68hc11_merge_symbol_attribute): Declare. * elf32-m68hc11.c (elf_backend_merge_symbol_attribute): Define. * elf32-m68hc12.c (elf_backend_merge_symbol_attribute): Define.
Diffstat (limited to 'bfd/elf32-m68hc1x.c')
-rw-r--r--bfd/elf32-m68hc1x.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/bfd/elf32-m68hc1x.c b/bfd/elf32-m68hc1x.c
index 961dce4..e1da8b2 100644
--- a/bfd/elf32-m68hc1x.c
+++ b/bfd/elf32-m68hc1x.c
@@ -1,6 +1,6 @@
/* Motorola 68HC11/HC12-specific support for 32-bit ELF
Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
- 2009, 2010, 2011 Free Software Foundation, Inc.
+ 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
Contributed by Stephane Carrez (stcarrez@nerim.fr)
This file is part of BFD, the Binary File Descriptor library.
@@ -214,6 +214,20 @@ elf32_m68hc11_add_symbol_hook (bfd *abfd, struct bfd_link_info *info,
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