From ccc09feae3d6d56c88e377193d26505a7da16a9b Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 8 Mar 2007 11:28:35 +0000 Subject: [PATCH] include/elf/ * v850.h (V850_OTHER_TDA_BYTE): Delete. (V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits that don't clash with visibility bits. bfd/ * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out V850_OTHER_* bits. --- bfd/ChangeLog | 5 +++++ bfd/elf32-v850.c | 9 ++++++++- include/elf/ChangeLog | 6 ++++++ include/elf/v850.h | 9 ++++----- 4 files changed, 23 insertions(+), 6 deletions(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index db9f241535..2dd58edb29 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,10 @@ 2007-03-08 Alan Modra + * elf32-v850.c (v850_elf_link_output_symbol_hook): Clean out + V850_OTHER_* bits. + +2007-03-08 Alan Modra + * Makefile.am (BFD64_BACKENDS): Add efi-app-x86_64.lo. (BFD64_BACKENDS_CFILES): Add efi-app-x86_64.c. Run "make dep-am". diff --git a/bfd/elf32-v850.c b/bfd/elf32-v850.c index 327edfa74b..0b77482096 100644 --- a/bfd/elf32-v850.c +++ b/bfd/elf32-v850.c @@ -2083,7 +2083,7 @@ v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, const char *name ATTRIBUTE_UNUSED, Elf_Internal_Sym *sym, asection *input_sec, - struct elf_link_hash_entry *h ATTRIBUTE_UNUSED) + struct elf_link_hash_entry *h) { /* If we see a common symbol, which implies a relocatable link, then if a symbol was in a special common section in an input file, mark @@ -2099,6 +2099,13 @@ v850_elf_link_output_symbol_hook (struct bfd_link_info *info ATTRIBUTE_UNUSED, sym->st_shndx = SHN_V850_ZCOMMON; } + /* The price we pay for using h->other unused bits as flags in the + linker is cleaning up after ourselves. */ + + if (h != NULL) + h->other &= ~(V850_OTHER_SDA | V850_OTHER_ZDA | V850_OTHER_TDA + | V850_OTHER_ERROR); + return TRUE; } diff --git a/include/elf/ChangeLog b/include/elf/ChangeLog index 87df15aa0b..ec6fdfab0d 100644 --- a/include/elf/ChangeLog +++ b/include/elf/ChangeLog @@ -1,3 +1,9 @@ +2007-03-08 Alan Modra + + * v850.h (V850_OTHER_TDA_BYTE): Delete. + (V850_OTHER_SDA, V850_OTHER_ZDA, V850_OTHER_TDA): Assign bits + that don't clash with visibility bits. + 2007-03-07 Alan Modra * common.h (ELF_ST_VISIBILITY): Comment typo fix. diff --git a/include/elf/v850.h b/include/elf/v850.h index 95dab49b67..a88969d915 100644 --- a/include/elf/v850.h +++ b/include/elf/v850.h @@ -1,5 +1,5 @@ /* V850 ELF support for BFD. - Copyright 1997, 1998, 2000, 2002, 2003, 2004 + Copyright 1997, 1998, 2000, 2002, 2003, 2004, 2007 Free Software Foundation, Inc. Created by Michael Meissner, Cygnus Support @@ -41,10 +41,9 @@ /* Flags for the st_other field. */ -#define V850_OTHER_SDA 0x01 /* Symbol had SDA relocations. */ -#define V850_OTHER_ZDA 0x02 /* Symbol had ZDA relocations. */ -#define V850_OTHER_TDA 0x04 /* Symbol had TDA relocations. */ -#define V850_OTHER_TDA_BYTE 0x08 /* Symbol had TDA byte relocations. */ +#define V850_OTHER_SDA 0x10 /* Symbol had SDA relocations. */ +#define V850_OTHER_ZDA 0x20 /* Symbol had ZDA relocations. */ +#define V850_OTHER_TDA 0x40 /* Symbol had TDA relocations. */ #define V850_OTHER_ERROR 0x80 /* Symbol had an error reported. */ /* V850 relocations. */ -- 2.11.0