From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31851 invoked by alias); 27 Sep 2010 11:40:11 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 31754 invoked by uid 9514); 27 Sep 2010 11:40:06 -0000 Date: Mon, 27 Sep 2010 11:40:00 -0000 Message-ID: <20100927114006.31736.qmail@sourceware.org> From: pmuldoon@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-pmuldoon-python-breakpoints: Merge branch 'master' into archer-pmuldoon-python-breakpoints X-Git-Refname: refs/heads/archer-pmuldoon-python-breakpoints X-Git-Reftype: branch X-Git-Oldrev: 7cba5e2afd758c6b3462ca52f0d3c6f4144b3355 X-Git-Newrev: a95e04ca2ca8fdeae594811689a97427f9297c7e X-SW-Source: 2010-q3/txt/msg00111.txt.bz2 List-Id: The branch, archer-pmuldoon-python-breakpoints has been updated via a95e04ca2ca8fdeae594811689a97427f9297c7e (commit) via 0e71db4d2ee3a8c168c6ef5476a36fabd58c7c11 (commit) via 7bf5255da5694eff7632e8464e44f3299217034d (commit) via 5e8450e4a974ea0d04bb46dadd4cac674e374d22 (commit) via aa639c6329ec493e3e9f123a4a845bed859507e8 (commit) via ee293fdd5ff3486bef65e4f872b463f6d92932d9 (commit) via acc8af847d83213abc69174e5a2cdc9b5b9eeecf (commit) via 52dbb162613f7cb7cf4e414b86d507052c63bc21 (commit) via 567c55d94fe7bce0dd3d82618b3ee7f910319e1a (commit) via b2bdd4ec26d7368c66530c89e0e9d04584f23ac2 (commit) via 5ce5693ba8da81ee0afa7b743e80daf4b735abe4 (commit) via 6aceb3f76551c9332a1fc12a7ba4cbb6fbd9a52e (commit) via c35d4b17866d95f88dfec12539acd6714bdb7061 (commit) via 31754a9dc78c7d283677b7e5e3d68dff891371b6 (commit) via 475c0e4dc2b66e2025dbc862155a55fd8b04466c (commit) via 328d04710b395061e65b4c9d3e063ff4ff9d5117 (commit) via 120873b176cfac0958e0378feec2c46139890545 (commit) via d53f48c3a270300ec7a3620e2270d9c7d6a0fca4 (commit) via bceafcae973da3cf59458e425f39c46fac613997 (commit) via fa51fc3bc5c3b8781a058b5917e15ca09c5ff2db (commit) via 1c2ae3626f38f87861a6f0eb0fb3063023cb3fd7 (commit) via 5c7709b71724f8b8371506d280a07660d58ca8cf (commit) via 6fcc496fec7b750793c85da4fd70470e8d176cfa (commit) via 56b89e1f162465abef29b960fd88b7ae574e70fa (commit) via 23c304e2a4ba1b02530f4cc2d5da8c17a5bec27f (commit) via 6febdbdd2647bf02802d4f051d37dd312ffdda85 (commit) via 07d01a4532b79e258289dc72905ac3725d420baf (commit) via b61a5fe0940352717a42426aec70e4844e8654fc (commit) via c6fa80a910f4e2c12c70869510b04356a93cc009 (commit) via ba4510b656b08751f72d4741b93c4596ad8eeaff (commit) via 09f7409a10f0506560e3567be4c15b49ac5396fa (commit) via 0b6be011a6eaa679b9a25f623c98f72c625807c4 (commit) via ae35288a9e046b50754df56422e61ca7179e325c (commit) via 9f3ac352623ece6d170a6f94b3413ee532528c29 (commit) via c6a5f5560402451d3ebd0f559d4f891151cc96a6 (commit) via cd120c49a12d5ea43939991a64438b337d9e5c7e (commit) via 405e18f17fbc5a62ce6c17b0d2749883de095673 (commit) via 8f8c824eac3c205b015bc4a4c3bd4b6e4f17d57c (commit) via 5a239fd6b354ceb8a4883cadb007b10ea2996065 (commit) via 9df2cd6d9d166bc17e3251e41b1118b76976336a (commit) via 365f0a0b6b629c3f8e5001d10b55c83963f08d35 (commit) via 0cc328604bb680d93e600926a5da3797e93f41d0 (commit) via df0e1413b3a179a86e8e207174902999acdafbb2 (commit) via 713e5270b64c38eec2661edd46ac9b29443e21d8 (commit) via 016bf22e98cd670562662c2917badf3ba0517f1d (commit) via da5fd72707e1f19dab343c9de9c51d4cf48eba61 (commit) via 5911a53fbef58ea324bac00ffc64dc9d6deb8df7 (commit) via 519e1f7c53a6d0add495fa08c5eccedbc24a1d3e (commit) via c408df2d80e5def5fc57fff7bc2dcf9e79f6d15a (commit) via 3c608a850b8c35416d1dfef6875af62adf62f076 (commit) via 0d21ec3bc7edce96ad959d5e9fd2fd8bc0b8e307 (commit) via 5354be2515b24e1f451606218fed990039ed3591 (commit) via a94d3393376ef0fd2b60292ad33100ca830c2df0 (commit) via 8ce2c9ced8485dc64edd4c274007d9252061521d (commit) via 6a4a712ca215ea1fea95fe64e73d92ec7bb8305b (commit) via efe1b362417c1cd51b6a0ca00bcf21a3fb797cd5 (commit) via 01a3616d4397e5cc80e024d1583e966706b66854 (commit) via 59c9593474be8bba278d9361a689ebad4013e314 (commit) via 132173fd8d416c8f2f2f71410a51a5db5d322f50 (commit) via f6333da5a82280bea786876098c03afcc2b0cce7 (commit) via 71fe0f1709007d0d57fb8d72cba05522eaa74ff1 (commit) via 3e6d829c6e8ff5fa42e0fddee02b35289b923192 (commit) via 542a3569b097c18cf0022684ff7a86fe29d55901 (commit) via 573c1119b57082cf461812195dda577cea7b0bb8 (commit) via f521e4e01ae86e32bf3372c62c2f1a0d4c18be96 (commit) from 7cba5e2afd758c6b3462ca52f0d3c6f4144b3355 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit a95e04ca2ca8fdeae594811689a97427f9297c7e Merge: 7cba5e2 0e71db4 Author: Phil Muldoon Date: Mon Sep 27 12:39:37 2010 +0100 Merge branch 'master' into archer-pmuldoon-python-breakpoints ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 44 ++++ bfd/bfd-in2.h | 1 + bfd/coffcode.h | 45 +++-- bfd/cpu-d10v.c | 20 +- bfd/elf.c | 2 +- bfd/elf32-arm.c | 4 +- bfd/elf32-cris.c | 2 +- bfd/elf32-hppa.c | 4 +- bfd/elf32-i370.c | 2 +- bfd/elf32-m32r.c | 2 +- bfd/elf32-m68k.c | 4 +- bfd/elf32-microblaze.c | 4 +- bfd/elf32-ppc.c | 10 +- bfd/elf32-score.c | 6 +- bfd/elf32-score7.c | 6 +- bfd/elf32-sh.c | 2 +- bfd/elf32-tic6x.c | 26 +++ bfd/elf32-vax.c | 2 +- bfd/elf32-xtensa.c | 2 +- bfd/elf64-alpha.c | 74 ++++---- bfd/elf64-hppa.c | 2 +- bfd/elf64-mips.c | 2 +- bfd/elf64-ppc.c | 14 +- bfd/elf64-sparc.c | 2 +- bfd/elfcode.h | 2 +- bfd/elflink.c | 14 +- bfd/elfxx-ia64.c | 4 +- bfd/elfxx-mips.c | 8 +- bfd/peXXigen.c | 43 ++++ bfd/version.h | 2 +- gdb/ChangeLog | 83 ++++++++ gdb/ada-tasks.c | 15 +- gdb/amd64-linux-nat.c | 20 +- gdb/configure | 26 ++- gdb/configure.ac | 20 ++- gdb/doc/ChangeLog | 9 + gdb/doc/gdb.texinfo | 53 ++++- gdb/dwarf2read.c | 48 +++-- gdb/gdbserver/ChangeLog | 9 + gdb/gdbserver/linux-x86-low.c | 20 +- gdb/infrun.c | 58 +++++- gdb/main.c | 6 +- gdb/objfiles.c | 9 +- gdb/objfiles.h | 45 ++++- gdb/python/py-auto-load.c | 2 - gdb/python/py-objfile.c | 2 +- gdb/python/py-progspace.c | 2 +- gdb/testsuite/ChangeLog | 30 +++ gdb/testsuite/gdb.base/siginfo-infcall.c | 79 +++++++ gdb/testsuite/gdb.base/siginfo-infcall.exp | 47 ++++ gdb/testsuite/gdb.cp/pr12028.cc | 21 ++ gdb/testsuite/gdb.cp/pr12028.exp | 29 +++ gdb/testsuite/gdb.dwarf2/dw2-const.S | 224 ++++++++++++++++++++ gdb/testsuite/gdb.dwarf2/dw2-const.exp | 46 ++++ gdb/testsuite/gdb.fortran/module.exp | 2 + gdb/testsuite/gdb.fortran/module.f90 | 2 + gdb/valops.c | 4 +- gdb/version.in | 2 +- include/ChangeLog | 13 ++ include/opcode/ChangeLog | 31 +++ include/opcode/arm.h | 31 +++- include/opcode/bfin.h | 170 +++++++++------ opcodes/ChangeLog | 103 +++++++++ opcodes/arm-dis.c | 177 ++++++++++++++-- opcodes/bfin-dis.c | 317 ++++++++++++++++++++-------- sim/rx/ChangeLog | 14 ++ sim/rx/cpu.h | 1 + sim/rx/fpu.c | 1 + sim/rx/gdb-if.c | 1 + sim/rx/load.c | 3 + sim/rx/misc.c | 1 + sim/rx/rx.c | 14 ++- sim/rx/syscalls.c | 1 + 73 files changed, 1781 insertions(+), 365 deletions(-) create mode 100644 gdb/testsuite/gdb.base/siginfo-infcall.c create mode 100644 gdb/testsuite/gdb.base/siginfo-infcall.exp create mode 100644 gdb/testsuite/gdb.cp/pr12028.cc create mode 100644 gdb/testsuite/gdb.cp/pr12028.exp create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-const.S create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-const.exp First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 545c603..b281a04 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,47 @@ +2010-09-24 Thomas Schwinge + + * elf32-arm.c, elf32-cris.c, elf32-hppa.c, elf32-i370.c, elf32-m32r.c, + elf32-m68k.c, elf32-microblaze.c, elf32-ppc.c, elf32-score.c, + elf32-score7.c, elf32-sh.c, elf32-vax.c, elf32-xtensa.c, elf64-alpha.c, + elf64-hppa.c, elf64-mips.c, elf64-ppc.c, elf64-sparc.c, elfcode.h, + elflink.c, elfxx-ia64.c, elfxx-mips.c: Use STN_UNDEF when referring to + the zero symbol index. + + * elflink.c (bfd_elf_reloc_symbol_deleted_p): Compare the symbol index + to STN_UNDEF, not SHN_UNDEF. + +2010-09-23 Bernd Schmidt + + * elf32-tic6x.c (elf32_tic6x_fake_sections): New function. + (elf_backend_fake_sections): Define. + +2010-09-23 Matthew Gretton-Dann + + * bfd-in2.h (BFD_RELOC_ARM_HVC): New enum value. + +2010-09-23 Alan Modra + + * cpu-d10v.c: Make bits_per_address 18 for all arch_info entries. + +2010-09-23 Alan Modra + + * elf.c (_bfd_elf_init_private_section_data): Allow for SEC_RELOC + difference between input and output section. + +2010-09-22 Kai Tietz + + * coffcode.h (sec_to_styp_flags): Adjust debug + sections to be conform to pe-coff specification + and avoid marking them as excluded. + (styp_to_sec_flags): Doing reverse mapping. + + * peXXigen.c (_bfd_XXi_final_link_postscript): Add handling for + setting IAT directory entry. + +2010-09-20 Richard Henderson + + * elf64-alpha.c (elf64_alpha_howto_table): Use bfd_elf_generic_reloc. + 2010-09-19 Richard Sandiford * elfxx-mips.c (mips_elf_link_hash_entry): Add got_only_for_calls. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 0e7b337..4bd47ca 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -3166,6 +3166,7 @@ pc-relative or some form of GOT-indirect relocation. */ BFD_RELOC_ARM_T32_ADD_PC12, BFD_RELOC_ARM_SHIFT_IMM, BFD_RELOC_ARM_SMC, + BFD_RELOC_ARM_HVC, BFD_RELOC_ARM_SWI, BFD_RELOC_ARM_MULTI, BFD_RELOC_ARM_CP_OFF_IMM, diff --git a/bfd/coffcode.h b/bfd/coffcode.h index 790908a..ff69704 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -636,6 +636,14 @@ static long sec_to_styp_flags (const char *sec_name, flagword sec_flags) { long styp_flags = 0; + bfd_boolean is_dbg = FALSE; + + if (CONST_STRNEQ (sec_name, DOT_DEBUG) +#ifdef COFF_LONG_SECTION_NAMES + || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI) +#endif + || CONST_STRNEQ (sec_name, ".stab")) + is_dbg = TRUE; /* caution: there are at least three groups of symbols that have very similar bits and meanings: IMAGE_SCN*, SEC_*, and STYP_*. @@ -646,16 +654,15 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags) but there are more IMAGE_SCN_* flags. */ /* FIXME: There is no gas syntax to specify the debug section flag. */ - if (CONST_STRNEQ (sec_name, DOT_DEBUG) - || CONST_STRNEQ (sec_name, GNU_LINKONCE_WI)) - sec_flags = SEC_DEBUGGING | SEC_READONLY; + if (is_dbg) + sec_flags = SEC_DEBUGGING | SEC_READONLY; /* skip LOAD */ /* READONLY later */ /* skip RELOC */ if ((sec_flags & SEC_CODE) != 0) styp_flags |= IMAGE_SCN_CNT_CODE; - if ((sec_flags & SEC_DATA) != 0) + if ((sec_flags & (SEC_DATA | SEC_DEBUGGING)) != 0) styp_flags |= IMAGE_SCN_CNT_INITIALIZED_DATA; if ((sec_flags & SEC_ALLOC) != 0 && (sec_flags & SEC_LOAD) == 0) styp_flags |= IMAGE_SCN_CNT_UNINITIALIZED_DATA; /* ==STYP_BSS */ @@ -666,9 +673,9 @@ sec_to_styp_flags (const char *sec_name, flagword sec_flags) styp_flags |= IMAGE_SCN_LNK_COMDAT; if ((sec_flags & SEC_DEBUGGING) != 0) styp_flags |= IMAGE_SCN_MEM_DISCARDABLE; - if ((sec_flags & SEC_EXCLUDE) != 0) + if ((sec_flags & SEC_EXCLUDE) != 0 && !is_dbg) styp_flags |= IMAGE_SCN_LNK_REMOVE; - if ((sec_flags & SEC_NEVER_LOAD) != 0) + if ((sec_flags & SEC_NEVER_LOAD) != 0 && !is_dbg) styp_flags |= IMAGE_SCN_LNK_REMOVE; /* skip IN_MEMORY */ /* skip SORT */ @@ -1120,7 +1127,14 @@ styp_to_sec_flags (bfd *abfd, long styp_flags = internal_s->s_flags; flagword sec_flags; bfd_boolean result = TRUE; + bfd_boolean is_dbg = FALSE; + if (CONST_STRNEQ (name, DOT_DEBUG) +#ifdef COFF_LONG_SECTION_NAMES + || CONST_STRNEQ (name, GNU_LINKONCE_WI) +#endif + || CONST_STRNEQ (name, ".stab")) + is_dbg = TRUE; /* Assume read only unless IMAGE_SCN_MEM_WRITE is specified. */ sec_flags = SEC_READONLY; @@ -1190,27 +1204,30 @@ styp_to_sec_flags (bfd *abfd, mean that a given section contains debug information. Thus we only set the SEC_DEBUGGING flag on sections that we recognise as containing debug information. */ - if (CONST_STRNEQ (name, DOT_DEBUG) + if (is_dbg #ifdef _COMMENT || strcmp (name, _COMMENT) == 0 #endif -#ifdef COFF_LONG_SECTION_NAMES - || CONST_STRNEQ (name, GNU_LINKONCE_WI) -#endif - || CONST_STRNEQ (name, ".stab")) - sec_flags |= SEC_DEBUGGING; + ) + { + sec_flags |= SEC_DEBUGGING | SEC_READONLY; + } break; case IMAGE_SCN_MEM_SHARED: sec_flags |= SEC_COFF_SHARED; break; case IMAGE_SCN_LNK_REMOVE: - sec_flags |= SEC_EXCLUDE; + if (!is_dbg) + sec_flags |= SEC_EXCLUDE; break; case IMAGE_SCN_CNT_CODE: sec_flags |= SEC_CODE | SEC_ALLOC | SEC_LOAD; break; case IMAGE_SCN_CNT_INITIALIZED_DATA: - sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD; + if (is_dbg) + sec_flags |= SEC_DEBUGGING; + else + sec_flags |= SEC_DATA | SEC_ALLOC | SEC_LOAD; break; case IMAGE_SCN_CNT_UNINITIALIZED_DATA: sec_flags |= SEC_ALLOC; diff --git a/bfd/cpu-d10v.c b/bfd/cpu-d10v.c index b69e840..b161115 100644 --- a/bfd/cpu-d10v.c +++ b/bfd/cpu-d10v.c @@ -1,5 +1,5 @@ /* BFD support for the D10V processor - Copyright 1996, 1999, 2000, 2002, 2005, 2007 + Copyright 1996, 1999, 2000, 2002, 2005, 2007, 2010 Free Software Foundation, Inc. Contributed by Martin Hunt (hunt@cygnus.com). @@ -27,7 +27,7 @@ static const bfd_arch_info_type d10v_ts3_info = { 16, /* 16 bits in a word. */ - 16, /* 16 bits in an address. */ + 18, /* really 16 bits in an address, but code has 18 bit range. */ 8, /* 8 bits in a byte. */ bfd_arch_d10v, bfd_mach_d10v_ts3, @@ -42,14 +42,14 @@ static const bfd_arch_info_type d10v_ts3_info = static const bfd_arch_info_type d10v_ts2_info = { - 16, /* 16 bits in a word. */ - 16, /* 16 bits in an address. */ - 8, /* 8 bits in a byte. */ + 16, + 18, + 8, bfd_arch_d10v, bfd_mach_d10v_ts2, "d10v", "d10v:ts2", - 4, /* Section alignment power. */ + 4, FALSE, bfd_default_compatible, bfd_default_scan, @@ -58,14 +58,14 @@ static const bfd_arch_info_type d10v_ts2_info = const bfd_arch_info_type bfd_d10v_arch = { - 16, /* 16 bits in a word. */ - 16, /* 16 bits in an address. */ - 8, /* 8 bits in a byte. */ + 16, + 18, + 8, bfd_arch_d10v, bfd_mach_d10v, "d10v", "d10v", - 4, /* Section alignment power. */ + 4, TRUE, bfd_default_compatible, bfd_default_scan, diff --git a/bfd/elf.c b/bfd/elf.c index 5ec92e9..fe5f19f 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -6110,7 +6110,7 @@ _bfd_elf_init_private_section_data (bfd *ibfd, && (osec->flags == isec->flags || (final_link && ((osec->flags ^ isec->flags) - & ~ (SEC_LINK_ONCE | SEC_LINK_DUPLICATES)) == 0))) + & ~(SEC_LINK_ONCE | SEC_LINK_DUPLICATES | SEC_RELOC)) == 0))) elf_section_type (osec) = elf_section_type (isec); /* FIXME: Is this correct for all OS/PROC specific flags? */ diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 74fb855..2125582 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -9063,7 +9063,7 @@ elf32_arm_relocate_section (bfd * output_bfd, name = bfd_section_name (input_bfd, sec); } - if (r_symndx != 0 + if (r_symndx != STN_UNDEF && r_type != R_ARM_NONE && (h == NULL || h->root.type == bfd_link_hash_defined @@ -10902,7 +10902,7 @@ elf32_arm_check_relocs (bfd *abfd, struct bfd_link_info *info, /* PR 9934: It is possible to have relocations that do not refer to symbols, thus it is also possible to have an object file containing relocations but no symbol table. */ - && (r_symndx > 0 || nsyms > 0)) + && (r_symndx > STN_UNDEF || nsyms > 0)) { (*_bfd_error_handler) (_("%B: bad symbol index: %d"), abfd, r_symndx); diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index 71634c9..f3ed80d 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1493,7 +1493,7 @@ cris_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case R_CRIS_16: case R_CRIS_32: if (info->shared - && r_symndx != 0 + && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0 && ((r_type != R_CRIS_8_PCREL && r_type != R_CRIS_16_PCREL diff --git a/bfd/elf32-hppa.c b/bfd/elf32-hppa.c index 1a6fef8..3a3a355 100644 --- a/bfd/elf32-hppa.c +++ b/bfd/elf32-hppa.c @@ -4472,7 +4472,7 @@ static enum elf_reloc_type_class elf32_hppa_reloc_type_class (const Elf_Internal_Rela *rela) { /* Handle TLS relocs first; we don't want them to be marked - relative by the "if (ELF32_R_SYM (rela->r_info) == 0)" + relative by the "if (ELF32_R_SYM (rela->r_info) == STN_UNDEF)" check below. */ switch ((int) ELF32_R_TYPE (rela->r_info)) { @@ -4482,7 +4482,7 @@ elf32_hppa_reloc_type_class (const Elf_Internal_Rela *rela) return reloc_class_normal; } - if (ELF32_R_SYM (rela->r_info) == 0) + if (ELF32_R_SYM (rela->r_info) == STN_UNDEF) return reloc_class_relative; switch ((int) ELF32_R_TYPE (rela->r_info)) diff --git a/bfd/elf32-i370.c b/bfd/elf32-i370.c index 67e6598..01f9fb8 100644 --- a/bfd/elf32-i370.c +++ b/bfd/elf32-i370.c @@ -1183,7 +1183,7 @@ i370_elf_relocate_section (bfd *output_bfd, case (int) R_I370_ADDR31: case (int) R_I370_ADDR16: if (info->shared - && r_symndx != 0) + && r_symndx != STN_UNDEF) { Elf_Internal_Rela outrel; bfd_byte *loc; diff --git a/bfd/elf32-m32r.c b/bfd/elf32-m32r.c index 28eff76..3df6add 100644 --- a/bfd/elf32-m32r.c +++ b/bfd/elf32-m32r.c @@ -2897,7 +2897,7 @@ m32r_elf_relocate_section (bfd *output_bfd ATTRIBUTE_UNUSED, case R_M32R_HI16_ULO_RELA: case R_M32R_LO16_RELA: if (info->shared - && r_symndx != 0 + && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0 && (( r_type != R_M32R_10_PCREL_RELA && r_type != R_M32R_18_PCREL_RELA diff --git a/bfd/elf32-m68k.c b/bfd/elf32-m68k.c index 7323612..8d1ee7f 100644 --- a/bfd/elf32-m68k.c +++ b/bfd/elf32-m68k.c @@ -4034,7 +4034,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, case R_68K_PC16: case R_68K_PC32: if (info->shared - && r_symndx != 0 + && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0 && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT @@ -4169,7 +4169,7 @@ elf_m68k_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } - if (r_symndx != 0 + if (r_symndx != STN_UNDEF && r_type != R_68K_NONE && (h == NULL || h->root.type == bfd_link_hash_defined diff --git a/bfd/elf32-microblaze.c b/bfd/elf32-microblaze.c index a64926a..e260c55 100644 --- a/bfd/elf32-microblaze.c +++ b/bfd/elf32-microblaze.c @@ -1067,10 +1067,10 @@ microblaze_elf_relocate_section (bfd *output_bfd, case (int) R_MICROBLAZE_64: case (int) R_MICROBLAZE_32: { - /* r_symndx will be zero only for relocs against symbols + /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols from removed linkonce sections, or sections discarded by a linker script. */ - if (r_symndx == 0 || (input_section->flags & SEC_ALLOC) == 0) + if (r_symndx == STN_UNDEF || (input_section->flags & SEC_ALLOC) == 0) { relocation += addend; if (r_type == R_MICROBLAZE_32) diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index ef0e159..2b457d6 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -6985,9 +6985,9 @@ ppc_elf_relocate_section (bfd *output_bfd, if (local_sections[r_symndx] == sec) break; if (r_symndx >= symtab_hdr->sh_info) - r_symndx = 0; + r_symndx = STN_UNDEF; rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; - if (r_symndx != 0) + if (r_symndx != STN_UNDEF) rel->r_addend -= (local_syms[r_symndx].st_value + sec->output_offset + sec->output_section->vma); @@ -7053,9 +7053,9 @@ ppc_elf_relocate_section (bfd *output_bfd, if (local_sections[r_symndx] == sec) break; if (r_symndx >= symtab_hdr->sh_info) - r_symndx = 0; + r_symndx = STN_UNDEF; rel->r_addend = htab->elf.tls_sec->vma + DTP_OFFSET; - if (r_symndx != 0) + if (r_symndx != STN_UNDEF) rel->r_addend -= (local_syms[r_symndx].st_value + sec->output_offset + sec->output_section->vma); @@ -7658,7 +7658,7 @@ ppc_elf_relocate_section (bfd *output_bfd, sym_name); ret = FALSE; } - else if (r_symndx == 0 || bfd_is_abs_section (sec)) + else if (r_symndx == STN_UNDEF || bfd_is_abs_section (sec)) ; else if (sec == NULL || sec->owner == NULL) { diff --git a/bfd/elf32-score.c b/bfd/elf32-score.c index f1f1aae..fec177a 100644 --- a/bfd/elf32-score.c +++ b/bfd/elf32-score.c @@ -2126,7 +2126,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, && h != NULL && h->root.def_dynamic && !h->root.def_regular)) - && r_symndx != 0 + && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0) { /* If we're creating a shared library, or this relocation is against a symbol @@ -2139,8 +2139,8 @@ score_elf_final_link_relocate (reloc_howto_type *howto, input_section)) return bfd_reloc_undefined; } - else if (r_symndx == 0) - /* r_symndx will be zero only for relocs against symbols + else if (r_symndx == STN_UNDEF) + /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols from removed linkonce sections, or sections discarded by a linker script. */ value = 0; diff --git a/bfd/elf32-score7.c b/bfd/elf32-score7.c index 85ce236..f780e56 100644 --- a/bfd/elf32-score7.c +++ b/bfd/elf32-score7.c @@ -2025,7 +2025,7 @@ score_elf_final_link_relocate (reloc_howto_type *howto, && h != NULL && h->root.def_dynamic && !h->root.def_regular)) - && r_symndx != 0 + && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0) { /* If we're creating a shared library, or this relocation is against a symbol @@ -2038,8 +2038,8 @@ score_elf_final_link_relocate (reloc_howto_type *howto, input_section)) return bfd_reloc_undefined; } - else if (r_symndx == 0) - /* r_symndx will be zero only for relocs against symbols + else if (r_symndx == STN_UNDEF) + /* r_symndx will be STN_UNDEF (zero) only for relocs against symbols from removed linkonce sections, or sections discarded by a linker script. */ value = 0; diff --git a/bfd/elf32-sh.c b/bfd/elf32-sh.c index 023ed7e..4937643 100644 --- a/bfd/elf32-sh.c +++ b/bfd/elf32-sh.c @@ -4405,7 +4405,7 @@ sh_elf_relocate_section (bfd *output_bfd, struct bfd_link_info *info, && (h == NULL || ELF_ST_VISIBILITY (h->other) == STV_DEFAULT || h->root.type != bfd_link_hash_undefweak) - && r_symndx != 0 + && r_symndx != STN_UNDEF && (input_section->flags & SEC_ALLOC) != 0 && !is_vxworks_tls && (r_type == R_SH_DIR32 diff --git a/bfd/elf32-tic6x.c b/bfd/elf32-tic6x.c index 3815ff1..ed3d3d9 100644 --- a/bfd/elf32-tic6x.c +++ b/bfd/elf32-tic6x.c @@ -1348,6 +1348,31 @@ elf32_tic6x_set_use_rela_p (bfd *abfd, bfd_boolean use_rela_p) } static bfd_boolean +elf32_tic6x_fake_sections (bfd *abfd, + Elf_Internal_Shdr *hdr ATTRIBUTE_UNUSED, + asection *sec) +{ + /* The generic elf_fake_sections will set up REL_HDR using the + default kind of relocations. But, we may actually need both + kinds of relocations, so we set up the second header here. */ + if ((sec->flags & SEC_RELOC) != 0) + { + struct bfd_elf_section_data *esd; + bfd_size_type amt = sizeof (Elf_Internal_Shdr); + + esd = elf_section_data (sec); + BFD_ASSERT (esd->rel_hdr2 == NULL); + esd->rel_hdr2 = bfd_zalloc (abfd, amt); + if (!esd->rel_hdr2) + return FALSE; + _bfd_elf_init_reloc_shdr (abfd, esd->rel_hdr2, sec, + !sec->use_rela_p); + } + + return TRUE; +} + +static bfd_boolean elf32_tic6x_mkobject (bfd *abfd) { bfd_boolean ret; @@ -1765,6 +1790,7 @@ elf32_tic6x_merge_private_bfd_data (bfd *ibfd, bfd *obfd) #define elf_backend_default_use_rela_p 1 #define elf_backend_may_use_rel_p 1 #define elf_backend_may_use_rela_p 1 hooks/post-receive -- Repository for Project Archer.