diff options
Diffstat (limited to 'bfd')
| -rw-r--r-- | bfd/bfd-in2.h | 9 | ||||
| -rw-r--r-- | bfd/bfd.c | 2 | ||||
| -rw-r--r-- | bfd/elf64-hppa.c | 2 | ||||
| -rw-r--r-- | bfd/elf64-x86-64.c | 4 | ||||
| -rw-r--r-- | bfd/elflink.c | 36 | ||||
| -rw-r--r-- | bfd/elfxx-x86.c | 3 | ||||
| -rw-r--r-- | bfd/libbfd.h | 5 | ||||
| -rw-r--r-- | bfd/reloc.c | 15 | ||||
| -rw-r--r-- | bfd/targets.c | 7 | ||||
| -rw-r--r-- | bfd/version.h | 2 |
10 files changed, 31 insertions, 54 deletions
diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 6c05c21..c89fe7a 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3871,7 +3871,6 @@ enum bfd_reloc_code_real /* x86-64/elf relocations. */ BFD_RELOC_X86_64_GOT32, - BFD_RELOC_X86_64_PLT32, BFD_RELOC_X86_64_COPY, BFD_RELOC_X86_64_GLOB_DAT, BFD_RELOC_X86_64_JUMP_SLOT, @@ -3892,7 +3891,6 @@ enum bfd_reloc_code_real BFD_RELOC_X86_64_GOTPCREL64, BFD_RELOC_X86_64_GOTPC64, BFD_RELOC_X86_64_GOTPLT64, - BFD_RELOC_X86_64_PLTOFF64, BFD_RELOC_X86_64_GOTPC32_TLSDESC, BFD_RELOC_X86_64_TLSDESC_CALL, BFD_RELOC_X86_64_TLSDESC, @@ -4108,9 +4106,6 @@ enum bfd_reloc_code_real BFD_RELOC_PPC64_GOT_DTPREL_PCREL34, BFD_RELOC_PPC64_TLS_PCREL, - /* IBM 370/390 relocations. */ - BFD_RELOC_I370_D12, - /* The type of reloc used to build a constructor table - at the moment probably a 32 bit wide absolute relocation, but the target can choose. It generally does map to one of the other relocation types. */ @@ -5692,10 +5687,6 @@ enum bfd_reloc_code_real /* Scenix IP2K - 7-bit sp or dp offset. */ BFD_RELOC_IP2K_FR_OFFSET, - /* Scenix VPE4K coprocessor - data/insn-space addressing. */ - BFD_RELOC_VPE4KMATH_DATA, - BFD_RELOC_VPE4KMATH_INSN, - /* These two relocations are used by the linker to determine which of the entries in a C++ virtual function table are actually used. When the --gc-sections option is given, the linker will zero out the @@ -1060,7 +1060,7 @@ _bfd_doprnt (bfd_print_callback print, void *stream, const char *format, if (*ptr != '%') { /* While we have regular characters, print them. */ - char *end = strchr (ptr, '%'); + const char *end = strchr (ptr, '%'); if (end != NULL) result = print (stream, "%.*s", (int) (end - ptr), ptr); else diff --git a/bfd/elf64-hppa.c b/bfd/elf64-hppa.c index 026c8a6..d1c0212 100644 --- a/bfd/elf64-hppa.c +++ b/bfd/elf64-hppa.c @@ -1698,6 +1698,7 @@ elf64_hppa_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) nh->other = STV_DEFAULT; bfd_elf_link_record_dynamic_symbol (info, nh); hppa_info->text_hash_entry = nh; + hppa_info->root.has_local_dynsyms = true; } } } @@ -1728,6 +1729,7 @@ elf64_hppa_late_size_sections (bfd *output_bfd, struct bfd_link_info *info) nh->other = STV_DEFAULT; bfd_elf_link_record_dynamic_symbol (info, nh); hppa_info->data_hash_entry = nh; + hppa_info->root.has_local_dynsyms = true; } } } diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c index 1bffced..3eb2fe0 100644 --- a/bfd/elf64-x86-64.c +++ b/bfd/elf64-x86-64.c @@ -233,7 +233,7 @@ static const struct elf_reloc_map x86_64_reloc_map[] = { BFD_RELOC_64, R_X86_64_64, }, { BFD_RELOC_32_PCREL, R_X86_64_PC32, }, { BFD_RELOC_X86_64_GOT32, R_X86_64_GOT32,}, - { BFD_RELOC_X86_64_PLT32, R_X86_64_PLT32,}, + { BFD_RELOC_32_PLT_PCREL, R_X86_64_PLT32,}, { BFD_RELOC_X86_64_COPY, R_X86_64_COPY, }, { BFD_RELOC_X86_64_GLOB_DAT, R_X86_64_GLOB_DAT, }, { BFD_RELOC_X86_64_JUMP_SLOT, R_X86_64_JUMP_SLOT, }, @@ -260,7 +260,7 @@ static const struct elf_reloc_map x86_64_reloc_map[] = { BFD_RELOC_X86_64_GOTPCREL64,R_X86_64_GOTPCREL64, }, { BFD_RELOC_X86_64_GOTPC64, R_X86_64_GOTPC64, }, { BFD_RELOC_X86_64_GOTPLT64, R_X86_64_GOTPLT64, }, - { BFD_RELOC_X86_64_PLTOFF64, R_X86_64_PLTOFF64, }, + { BFD_RELOC_64_PLTOFF, R_X86_64_PLTOFF64, }, { BFD_RELOC_SIZE32, R_X86_64_SIZE32, }, { BFD_RELOC_SIZE64, R_X86_64_SIZE64, }, { BFD_RELOC_X86_64_GOTPC32_TLSDESC, R_X86_64_GOTPC32_TLSDESC, }, diff --git a/bfd/elflink.c b/bfd/elflink.c index 5fe83cc..39fac06 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -169,7 +169,7 @@ _bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie, struct elf_link_hash_entry *h; h = get_ext_sym_hash_from_cookie (cookie, r_symndx); - + if (h != NULL) { if (h->root.type == bfd_link_hash_defined @@ -596,7 +596,7 @@ bfd_elf_link_record_dynamic_symbol (struct bfd_link_info *info, if (h->dynindx == -1) { struct elf_strtab_hash *dynstr; - char *p; + const char *p; const char *name; size_t indx; @@ -726,7 +726,7 @@ bfd_elf_record_link_assignment (bfd *output_bfd, if (h->versioned == unknown) { /* Set versioned if symbol version is unknown. */ - char *version = strrchr (name, ELF_VER_CHR); + const char *version = strrchr (name, ELF_VER_CHR); if (version) { if (version > name && version[-1] != ELF_VER_CHR) @@ -1161,7 +1161,7 @@ _bfd_elf_merge_symbol (bfd *abfd, bool newdyn, olddyn, olddef, newdef, newdyncommon, olddyncommon; bool newweak, oldweak, newfunc, oldfunc; const struct elf_backend_data *bed; - char *new_version; + const char *new_version; bool default_sym = *matched; struct elf_link_hash_table *htab; @@ -1241,7 +1241,7 @@ _bfd_elf_merge_symbol (bfd *abfd, { /* OLD_VERSION is the symbol version of the existing symbol. */ - char *old_version; + const char *old_version; if (h->versioned >= versioned) old_version = strrchr (h->root.root.string, @@ -1965,7 +1965,7 @@ _bfd_elf_add_default_symbol (bfd *abfd, bool collect; bool dynamic; bfd *override; - char *p; + const char *p; size_t len, shortlen; asection *tmp_sec; bool matched; @@ -2657,7 +2657,7 @@ _bfd_elf_link_assign_sym_version (struct elf_link_hash_entry *h, void *data) struct bfd_link_info *info; const struct elf_backend_data *bed; struct elf_info_failed eif; - char *p; + const char *p; bool hide; sinfo = (struct elf_info_failed *) data; @@ -5665,7 +5665,7 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) && !dynamic && (abfd->flags & BFD_PLUGIN) == 0) { - char *p = strchr (name, ELF_VER_CHR); + const char *p = strchr (name, ELF_VER_CHR); if (p != NULL && p[1] != ELF_VER_CHR) { /* Queue non-default versions so that .symver x, x@FOO @@ -5915,7 +5915,8 @@ elf_link_add_object_symbols (bfd *abfd, struct bfd_link_info *info) for (cnt = 0; cnt < nondeflt_vers_cnt; ++cnt) { struct elf_link_hash_entry *h = nondeflt_vers[cnt], *hi; - char *shortname, *p; + char *shortname; + const char *p; size_t amt; p = strchr (h->root.root.string, ELF_VER_CHR); @@ -6187,7 +6188,8 @@ _bfd_elf_archive_symbol_lookup (bfd *abfd, const char *name) { struct bfd_link_hash_entry *h; - char *p, *copy; + const char *p; + char *copy; size_t len, first; h = bfd_link_hash_lookup (info->hash, name, false, false, true); @@ -6482,7 +6484,7 @@ elf_collect_hash_codes (struct elf_link_hash_entry *h, void *data) name = h->root.root.string; if (h->versioned >= versioned) { - char *p = strchr (name, ELF_VER_CHR); + const char *p = strchr (name, ELF_VER_CHR); if (p != NULL) { alc = (char *) bfd_malloc (p - name + 1); @@ -6556,7 +6558,7 @@ elf_collect_gnu_hash_codes (struct elf_link_hash_entry *h, void *data) name = h->root.root.string; if (h->versioned >= versioned) { - char *p = strchr (name, ELF_VER_CHR); + const char *p = strchr (name, ELF_VER_CHR); if (p != NULL) { alc = (char *) bfd_malloc (p - name + 1); @@ -10373,8 +10375,8 @@ elf_link_output_symstrtab (void *finf, { /* Keep only one '@' for versioned symbols defined in shared objects. */ - char *version = strrchr (name, ELF_VER_CHR); - char *base_end = strchr (name, ELF_VER_CHR); + const char *version = strrchr (name, ELF_VER_CHR); + const char *base_end = strchr (name, ELF_VER_CHR); if (version != base_end) { size_t base_len; @@ -11117,7 +11119,7 @@ elf_link_output_extsym (struct bfd_hash_entry *bh, void *data) || h->ref_dynamic || !h->def_regular)) { - char *p = strrchr (h->root.root.string, ELF_VER_CHR); + const char *p = strrchr (h->root.root.string, ELF_VER_CHR); if (p && p [1] != '\0') { @@ -11676,7 +11678,7 @@ elf_link_input_bfd (struct elf_final_link_info *flinfo, bfd *input_bfd) input_bfd); bfd_set_error (bfd_error_bad_value); return false; - } + } /* Arrange for symbol to be output. */ h->indx = -2; @@ -15152,7 +15154,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie) struct elf_link_hash_entry *h; h = get_ext_sym_hash_from_cookie (rcookie, r_symndx); - + if (h != NULL) { if ((h->root.type == bfd_link_hash_defined diff --git a/bfd/elfxx-x86.c b/bfd/elfxx-x86.c index e5a24c4..4495b3e 100644 --- a/bfd/elfxx-x86.c +++ b/bfd/elfxx-x86.c @@ -892,7 +892,8 @@ _bfd_x86_elf_link_check_relocs (bfd *abfd, struct bfd_link_info *info) elf_x86_hash_entry (h)->tls_get_addr = 1; } - htab->has_tls_get_addr_call = 1; + if (h->ref_regular) + htab->has_tls_get_addr_call = 1; } /* Pass NULL for __ehdr_start which will be defined by diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 2ae9b36..6a2eff4 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -1445,7 +1445,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_386_IRELATIVE", "BFD_RELOC_386_GOT32X", "BFD_RELOC_X86_64_GOT32", - "BFD_RELOC_X86_64_PLT32", "BFD_RELOC_X86_64_COPY", "BFD_RELOC_X86_64_GLOB_DAT", "BFD_RELOC_X86_64_JUMP_SLOT", @@ -1466,7 +1465,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_X86_64_GOTPCREL64", "BFD_RELOC_X86_64_GOTPC64", "BFD_RELOC_X86_64_GOTPLT64", - "BFD_RELOC_X86_64_PLTOFF64", "BFD_RELOC_X86_64_GOTPC32_TLSDESC", "BFD_RELOC_X86_64_TLSDESC_CALL", "BFD_RELOC_X86_64_TLSDESC", @@ -1671,7 +1669,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_PPC64_GOT_TPREL_PCREL34", "BFD_RELOC_PPC64_GOT_DTPREL_PCREL34", "BFD_RELOC_PPC64_TLS_PCREL", - "BFD_RELOC_I370_D12", "BFD_RELOC_CTOR", "BFD_RELOC_ARM_PCREL_BRANCH", "BFD_RELOC_ARM_PCREL_BLX", @@ -2582,8 +2579,6 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_IP2K_PC_SKIP", "BFD_RELOC_IP2K_TEXT", "BFD_RELOC_IP2K_FR_OFFSET", - "BFD_RELOC_VPE4KMATH_DATA", - "BFD_RELOC_VPE4KMATH_INSN", "BFD_RELOC_VTABLE_INHERIT", "BFD_RELOC_VTABLE_ENTRY", "BFD_RELOC_IA64_IMM14", diff --git a/bfd/reloc.c b/bfd/reloc.c index 68a8929..45ba861 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -2416,8 +2416,6 @@ ENUMDOC ENUM BFD_RELOC_X86_64_GOT32 ENUMX - BFD_RELOC_X86_64_PLT32 -ENUMX BFD_RELOC_X86_64_COPY ENUMX BFD_RELOC_X86_64_GLOB_DAT @@ -2458,8 +2456,6 @@ ENUMX ENUMX BFD_RELOC_X86_64_GOTPLT64 ENUMX - BFD_RELOC_X86_64_PLTOFF64 -ENUMX BFD_RELOC_X86_64_GOTPC32_TLSDESC ENUMX BFD_RELOC_X86_64_TLSDESC_CALL @@ -2886,11 +2882,6 @@ ENUMDOC PowerPC and PowerPC64 thread-local storage relocations. ENUM - BFD_RELOC_I370_D12 -ENUMDOC - IBM 370/390 relocations. - -ENUM BFD_RELOC_CTOR ENUMDOC The type of reloc used to build a constructor table - at the moment @@ -5435,12 +5426,6 @@ ENUM BFD_RELOC_IP2K_FR_OFFSET ENUMDOC Scenix IP2K - 7-bit sp or dp offset. -ENUM - BFD_RELOC_VPE4KMATH_DATA -ENUMX - BFD_RELOC_VPE4KMATH_INSN -ENUMDOC - Scenix VPE4K coprocessor - data/insn-space addressing. ENUM BFD_RELOC_VTABLE_INHERIT diff --git a/bfd/targets.c b/bfd/targets.c index 4ac7092..2eac739 100644 --- a/bfd/targets.c +++ b/bfd/targets.c @@ -1664,7 +1664,7 @@ bfd_get_target_info (const char *target_name, bfd *abfd, if (arches && tname) { - char *hyp = strchr (tname, '-'); + const char *hyp = strchr (tname, '-'); if (hyp != NULL) { @@ -1677,9 +1677,10 @@ bfd_get_target_info (const char *target_name, bfd *abfd, char new_tname[50]; strcpy (new_tname, hyp); - while ((hyp = strrchr (new_tname, '-')) != NULL) + char *new_hyp; + while ((new_hyp = strrchr (new_tname, '-')) != NULL) { - *hyp = 0; + *new_hyp = 0; if (_bfd_find_arch_match (new_tname, arches, def_target_arch)) break; diff --git a/bfd/version.h b/bfd/version.h index 5c7408f..5852f00 100644 --- a/bfd/version.h +++ b/bfd/version.h @@ -16,7 +16,7 @@ In releases, the date is not included in either version strings or sonames. */ -#define BFD_VERSION_DATE 20251204 +#define BFD_VERSION_DATE 20251209 #define BFD_VERSION @bfd_version@ #define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@ #define REPORT_BUGS_TO @report_bugs_to@ |
