aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-sh.c18
-rw-r--r--include/ChangeLog5
-rw-r--r--include/elf/sh.h21
4 files changed, 12 insertions, 37 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 76f5630..12798e5 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-21 Alan Modra <amodra@gmail.com>
+
+ * elf32-sh.c (sh_elf_relocate_section): Remove STO_SH5_ISA32
+ processing.
+
2020-04-20 Stephen Casner <casner@acm.org>
* pdp11.c (N_STAB): Modify value to avoid conflict with N_EXT
diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c
index db07f8f..24e879e 100644
--- a/bfd/elf32-sh.c
+++ b/bfd/elf32-sh.c
@@ -3563,7 +3563,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
bfd_vma relocation;
bfd_vma addend = (bfd_vma) 0;
bfd_reloc_status_type r;
- int seen_stt_datalabel = 0;
bfd_vma off;
enum got_type got_type;
const char *symname = NULL;
@@ -3626,14 +3625,6 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
relocation = (sec->output_section->vma
+ sec->output_offset
+ sym->st_value);
- /* A local symbol never has STO_SH5_ISA32, so we don't need
- datalabel processing here. Make sure this does not change
- without notice. */
- if ((sym->st_other & STO_SH5_ISA32) != 0)
- (*info->callbacks->reloc_dangerous)
- (info,
- _("unexpected STO_SH5_ISA32 on local symbol is not handled"),
- input_bfd, input_section, rel->r_offset);
if (sec != NULL && discarded_section (sec))
/* Handled below. */
@@ -3783,14 +3774,9 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info,
|| sh_elf_hash_entry (h)->got_type == GOT_TLS_GD)))
;
else if (sec->output_section != NULL)
- relocation = ((h->root.u.def.value
+ relocation = (h->root.u.def.value
+ sec->output_section->vma
- + sec->output_offset)
- /* A STO_SH5_ISA32 causes a "bitor 1" to the
- symbol value, unless we've seen
- STT_DATALABEL on the way to it. */
- | ((h->other & STO_SH5_ISA32) != 0
- && ! seen_stt_datalabel));
+ + sec->output_offset);
else if (!bfd_link_relocatable (info)
&& (_bfd_elf_section_offset (output_bfd, info,
input_section,
diff --git a/include/ChangeLog b/include/ChangeLog
index 42698b2..1829ec5 100644
--- a/include/ChangeLog
+++ b/include/ChangeLog
@@ -1,3 +1,8 @@
+2020-04-21 Alan Modra <amodra@gmail.com>
+
+ * elf/sh.h (STO_SH5_ISA32, SHF_SH5_ISA32, SHF_SH5_ISA32_MIXED),
+ (SHT_SH5_CR_SORTED, STT_DATALABEL): Delete.
+
2020-04-10 Fangrui Song <maskray@google.com>
PR binutils/24613
diff --git a/include/elf/sh.h b/include/elf/sh.h
index c81d7f9..0408ec2 100644
--- a/include/elf/sh.h
+++ b/include/elf/sh.h
@@ -95,27 +95,6 @@ int sh_elf_get_flags_from_mach (unsigned long mach);
be relocated independently. */
#define EF_SH_FDPIC 0x8000 /* Uses the FDPIC ABI. */
-/* Flags for the st_other symbol field.
- Keep away from the STV_ visibility flags (bit 0..1). */
-
-/* A reference to this symbol should by default add 1. */
-#define STO_SH5_ISA32 (1 << 2)
-
-/* Section contains only SHmedia code (no SHcompact code). */
-#define SHF_SH5_ISA32 0x40000000
-
-/* Section contains both SHmedia and SHcompact code, and possibly also
- constants. */
-#define SHF_SH5_ISA32_MIXED 0x20000000
-
-/* If applied to a .cranges section, marks that the section is sorted by
- increasing cr_addr values. */
-#define SHT_SH5_CR_SORTED 0x80000001
-
-/* Symbol should be handled as DataLabel (attached to global SHN_UNDEF
- symbols). */
-#define STT_DATALABEL STT_LOPROC
-
#include "elf/reloc-macros.h"
/* Relocations. */