From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2776 invoked by alias); 27 Mar 2009 13:42:54 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 2545 invoked by uid 9674); 27 Mar 2009 13:42:44 -0000 Date: Fri, 27 Mar 2009 13:42:00 -0000 Message-ID: <20090327134243.2530.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-jankratochvil-vla: Merge commit 'origin/archer-jankratochvil-type-refcount' into archer-jankratochvil-vla X-Git-Refname: refs/heads/archer-jankratochvil-vla X-Git-Reftype: branch X-Git-Oldrev: c325065ffe6bddac7001ea5f670867e078a9d51a X-Git-Newrev: a3a3dfd191442d61c3d8da1bb8a93ae0e21ba367 X-SW-Source: 2009-q1/txt/msg00384.txt.bz2 List-Id: The branch, archer-jankratochvil-vla has been updated via a3a3dfd191442d61c3d8da1bb8a93ae0e21ba367 (commit) via 72c5160f30478eb9adb2c2c6dd3bef79cb64524e (commit) via 6da1b9f22fea0100d12be1c28da02f2da58d72e0 (commit) via 4d8c7703513a874c6bedcaf9c35acd4429820595 (commit) via d0679e9c73f28a61899b0a9704e943ee84aa3f44 (commit) via 662e441963535d357f1b60e03f3c04185610ec15 (commit) via f3e48bd7590a90ddadba59eee36bc0f520dd72eb (commit) via 8340d06295c8db80c544503458305197891e0348 (commit) via 7d22f078b354263b0c95d7c3aec2970fd9640645 (commit) via 69f5809898b23548161e77d8a4eb0e1d403f8fb6 (commit) via 534a7a6f626d428d828cf9ae747293dafa85ee46 (commit) via 4c62718461563febf1b8157450f2f91f26353a83 (commit) via a7715162f759ef281588c9ddd4e54253db16305f (commit) via bae36faa443bd8c26a356b7f10853ded46bfe4c5 (commit) via aa878e330bf25fe65aaac2744005e69c8ad5ff39 (commit) via b66b5da01fe075f79266fe57b1da5b2fbc94732f (commit) via 9847bf4e6e7bb0dea075e76572c9c67ca7c341e2 (commit) via c35358da5ca26adb4a1bfba51c11ac196785e8e4 (commit) via 699f6ffa111111aff2e63b4b860b9adfad7fad22 (commit) via 31553d1785659d1fe3a5e231ee330968193099b3 (commit) via 3a64e350b82942734fbcb0b31dd775ed9617e999 (commit) via 7c7ca1b8250e6b0f97f7eb47d6ab74227a3fabdd (commit) via 697b6e50ee00d29a2e2a9006bffef55c90a700f9 (commit) via c98e800a85b9485019404fadac21abe3491b5033 (commit) via f6cb81d808067e2a1c443038130a558360afe58f (commit) via b5b3803e51adcd6d72e2cb884318cea9aa42ba7d (commit) via ff27faab30e391dad4a61952bd9f1587ff99d0a5 (commit) via d1cfa18fb5ba2ce7803f31e58c5f509519eb6f10 (commit) via 5111bbd29c48b9004b35e2514752cf4a941b61c6 (commit) via 2df9de1ad9d3da7dcc80ef49ebd45e001269bc73 (commit) via 091af1a56e30d47a8d828afc931167f8142507b2 (commit) via e354c4e1dc0b4ce964e9717e9f494a06518ae21f (commit) via ae61ba3985913274b7e3711f7c1da4d023d9ded9 (commit) via c7deb4d727569b24ed60450f0d8498a53255423e (commit) via 1a9bd38bcd06c2bcc0fea51b36ded2507ba73b3c (commit) via f037d6004a582839ce69eafe3071bc29b0fb6fcd (commit) via 3157aba1ab73fb5b5cd0e2dbb5c031a1336a93db (commit) via 64c287329177f68d0da2ce81207f5f3f105dabfe (commit) via cbd12f3666346846dd18e762f7881f4a0b1767ee (commit) via 3092115a3d791e551209af2e1945666169a04de7 (commit) via 27c4a5d2ebbfd4f68a5e87b459adbbc6eeda7cf8 (commit) via 8c4195d13e945d3cf2c8583c9f818bbf4a3b5710 (commit) via 390ac7259731cdf469ea739345e64d3a7d248818 (commit) via 9533c58c4b0c692975a4b97267222ad002364a29 (commit) via 3f81316d6eb8f3c951acd8774da7bc8ad23bdedd (commit) via c5f1a7ef72922178569418b5d5060f8240c1767e (commit) via 6f1a685bc7bfe44af998e54b99963dffc8e715e5 (commit) via d7b3c9ecbb4f7c782aacbe4224c9aeb8d0d161b2 (commit) via b20dff1b337ceb1bd5f241bff2ed1233780936df (commit) via 032f67142ca0678c31a574314adc53d316960f72 (commit) via 817ede0ad440e39f3311cc8a1f55ad5655b97e9a (commit) via 165709eaa90768f4d03e76188188e5e5afa4ac2c (commit) via 50a6b4966bccf97597d65486bd60561d05a65dff (commit) via b3c3db206b652d19fad5290df7b630335acc5889 (commit) via 02dc98a6209b37e8473ee3218b5eb4ff6bc7e44d (commit) via 70e735001ef74606d3e86a75cf4fd04173e10974 (commit) via 90ab18a605385cb7e7984c4ac83a4f7461f99906 (commit) via 3836cfdf3b7de8b0f34fda25e5a1b4ae33e253ea (commit) via 6c2b67e0220165c9411c128b2f8f7d1e8856795b (commit) via 7f0e4fa27448e8da47cdedfa6f8342f94245ab76 (commit) via ff21434d7a766aba9f937e270016e4e7d9e6ba40 (commit) via 40dd9754f21987e1fca43c2cde6b3adc18464f1d (commit) via 60194aaeeb94372651c09fb5dc0cb5d3329b921e (commit) via c3bcf1c464f8633b5ce91cb72bafee27ce9b05ce (commit) via 7d1733001ce46390908da9e6868f45006409b056 (commit) via 214296a4b2a36f3e0bc8a270647da2fc21b8b874 (commit) via 7ad6aabd74342df423bc2ba496c9750e14d86e85 (commit) via 0ee8ee241dcc7feeaf538a120826051dcd8cccfd (commit) via 3caef2b656659161247d9c8d418ba8fcc889a04c (commit) via da12fddea1a71fb3b808e88a5ef83bbca8e2cb30 (commit) via 297cccbb83721274c4df1eec08dde9eb9f51a733 (commit) via 7f43a566f95a1cf96ed799471319b5c574ee575e (commit) via e0f2167a8e0855ab0a1545da2b5f1472cac923dc (commit) via 0db2376071441d14829885eaa95b2b8a69a3a1ae (commit) via 22a744906c7e0303d9f56c9160900946eff17206 (commit) via d65e7bd9988748a8d39dba3439cbf3cfc873f724 (commit) via e5e85060ca59a79204d185b1b4cf3e30eb0fd1ba (commit) via 50158e6deec5d6304429f655fd0a7990c0c14cfc (commit) via f01a34d4d484fb2a8e69233429e993283ee39235 (commit) via d33df476c193a636fbc205d541dce62a6b327fdb (commit) via 5943423dd8fd3c0df0586c8c05631165d84f341d (commit) via b4494ffc89755afd15f3dda0b71b82244aa5ea2f (commit) via 095e9826734cc7660ab9f444e72a517736272902 (commit) via a371c4d2c371566a571f9c9d08df72f200024b9c (commit) via 2e7a4dfe356485e3d14ec2b73b405f016336fcd2 (commit) via d351e41f278158d1b8219d523b0fa03c02b76189 (commit) via 8a4ca176c977982bf74c885ec927ed3d6c677bde (commit) via 6418262610197a1d63af6393d077f10fac01304c (commit) via 67df65cc54808054e45498160f67ce682a9aaa7b (commit) via 7075b478c79fa7bf8a95b17474f5f799b0ad5523 (commit) from c325065ffe6bddac7001ea5f670867e078a9d51a (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 69 + bfd/cpu-i386.c | 8 +- bfd/elf.c | 9 +- bfd/elf32-cris.c | 37 +- bfd/elf32-crx.c | 40 +- bfd/elf32-ppc.c | 31 +- bfd/elf32-s390.c | 33 +- bfd/elf64-ppc.c | 12 +- bfd/elf64-s390.c | 33 +- bfd/version.h | 2 +- gdb/ChangeLog | 665 ++++ gdb/Makefile.in | 18 +- gdb/NEWS | 14 + gdb/acinclude.m4 | 61 +- gdb/ada-exp.y | 1 + gdb/ada-lang.c | 34 +- gdb/ada-lang.h | 8 +- gdb/ada-typeprint.c | 11 +- gdb/ada-valprint.c | 26 +- gdb/auxv.c | 3 +- gdb/breakpoint.c | 107 +- gdb/buildsym.c | 26 + gdb/c-exp.y | 477 ++- gdb/c-lang.c | 826 ++++- gdb/c-lang.h | 41 +- gdb/c-valprint.c | 83 +- gdb/charset-list.h | 1190 +++++++ gdb/charset.c | 1563 +++------ gdb/charset.h | 184 +- gdb/cli/cli-cmds.c | 14 +- gdb/cli/cli-decode.c | 12 - gdb/cli/cli-decode.h | 11 - gdb/completer.c | 97 +- gdb/completer.h | 2 + gdb/config.in | 9 + gdb/config/i386/nm-cygwin.h | 1 - gdb/config/i386/nm-cygwin64.h | 1 - gdb/config/i386/nm-fbsd.h | 1 - gdb/config/i386/nm-go32.h | 1 - gdb/config/i386/nm-i386.h | 59 +- gdb/config/i386/nm-linux.h | 1 - gdb/config/i386/nm-linux64.h | 1 - gdb/configure | 651 +++-- gdb/configure.ac | 60 +- gdb/darwin-nat.c | 8 +- gdb/defs.h | 2 + gdb/doc/ChangeLog | 59 + gdb/doc/gdb.texinfo | 190 +- gdb/doc/gdbint.texinfo | 1651 +++++++-- gdb/doc/observer.texi | 10 +- gdb/doc/stack_frame.eps | 3708 ++++++++++++++++++++ gdb/doc/stack_frame.pdf | Bin 0 -> 77972 bytes gdb/doc/stack_frame.png | Bin 0 -> 67273 bytes gdb/doc/stack_frame.svg | 866 +++++ gdb/doc/stack_frame.txt | 39 + gdb/dwarf2expr.c | 2 +- gdb/dwarf2read.c | 7 + gdb/eval.c | 18 +- gdb/expprint.c | 12 +- gdb/f-lang.c | 20 +- gdb/f-valprint.c | 7 +- gdb/frame.c | 15 +- gdb/gdb_locale.h | 4 + gdb/gdb_obstack.h | 3 + gdb/{mi/mi-main.h => gdb_usleep.c} | 35 +- gdb/{mi/mi-main.h => gdb_usleep.h} | 24 +- gdb/gdb_wchar.h | 62 + gdb/gdbserver/ChangeLog | 33 + gdb/gdbserver/Makefile.in | 18 +- gdb/gdbserver/configure | 2 +- gdb/gdbserver/configure.ac | 6 +- gdb/gdbserver/gdbreplay.c | 2 +- gdb/gdbserver/i387-fp.c | 40 +- gdb/gdbserver/inferiors.c | 5 +- gdb/gdbserver/linux-arm-low.c | 2 +- gdb/gdbserver/linux-cris-low.c | 4 +- gdb/gdbserver/linux-crisv32-low.c | 44 +- gdb/gdbserver/linux-i386-low.c | 4 +- gdb/gdbserver/linux-low.c | 177 +- gdb/gdbserver/linux-mips-low.c | 2 +- gdb/gdbserver/linux-ppc-low.c | 17 +- gdb/gdbserver/linux-s390-low.c | 1 - gdb/gdbserver/linux-sparc-low.c | 39 +- gdb/gdbserver/linux-x86-64-low.c | 10 +- gdb/gdbserver/linux-xtensa-low.c | 2 +- gdb/gdbserver/proc-service.c | 2 - gdb/gdbserver/regcache.c | 5 +- gdb/gdbserver/remote-utils.c | 48 +- gdb/gdbserver/server.c | 56 +- gdb/gdbserver/spu-low.c | 8 +- gdb/gdbserver/target.h | 8 +- gdb/gdbserver/thread-db.c | 2 +- gdb/gdbserver/win32-low.c | 82 +- gdb/gdbserver/xtensa-xtregs.c | 1 - gdb/gdbthread.h | 4 + gdb/gdbtypes.h | 10 +- gdb/infcall.c | 26 +- gdb/infcmd.c | 44 +- gdb/inferior.h | 12 - gdb/infrun.c | 48 +- gdb/jv-lang.c | 5 +- gdb/jv-valprint.c | 4 +- gdb/language.c | 16 +- gdb/language.h | 21 +- gdb/linux-nat.c | 2 +- gdb/m2-lang.c | 19 +- gdb/m2-valprint.c | 10 +- gdb/macroexp.c | 31 +- gdb/mi/mi-interp.c | 43 +- gdb/mi/mi-main.c | 40 +- gdb/mi/mi-main.h | 1 + gdb/mn10300-tdep.c | 1270 ++++--- gdb/objc-lang.c | 16 +- gdb/p-lang.c | 32 +- gdb/p-lang.h | 9 +- gdb/p-valprint.c | 20 +- gdb/parse.c | 61 +- gdb/parser-defs.h | 18 + gdb/ppc-linux-nat.c | 12 +- gdb/printcmd.c | 108 +- gdb/python/python-cmd.c | 12 +- gdb/python/python-function.c | 180 + gdb/python/python-internal.h | 1 + gdb/python/python-value.c | 45 +- gdb/python/python.c | 12 +- gdb/remote.c | 33 +- gdb/scm-lang.c | 6 +- gdb/scm-lang.h | 2 +- gdb/scm-valprint.c | 3 +- gdb/ser-unix.c | 9 +- gdb/stack.c | 12 +- gdb/symfile.c | 9 +- gdb/testsuite/ChangeLog | 83 + gdb/testsuite/gdb.base/auxv.exp | 12 +- gdb/testsuite/gdb.base/call-rt-st.exp | 2 +- gdb/testsuite/gdb.base/callfuncs.exp | 14 +- gdb/testsuite/gdb.base/charset.c | 39 +- gdb/testsuite/gdb.base/charset.exp | 226 +- gdb/testsuite/gdb.base/completion.exp | 30 + gdb/testsuite/gdb.base/constvars.exp | 6 +- gdb/testsuite/gdb.base/ending-run.exp | 4 +- gdb/testsuite/gdb.base/long_long.exp | 10 +- gdb/testsuite/gdb.base/pointers.exp | 2 +- gdb/testsuite/gdb.base/printcmds.exp | 58 +- gdb/testsuite/gdb.base/setvar.exp | 6 +- gdb/testsuite/gdb.base/store.exp | 4 +- gdb/testsuite/gdb.cp/ref-types.exp | 4 +- .../gdb.dwarf2/dw2-noloc-main.c} | 30 +- gdb/testsuite/gdb.dwarf2/dw2-noloc.S | 328 ++- gdb/testsuite/gdb.dwarf2/dw2-noloc.exp | 110 +- gdb/testsuite/gdb.mi/mi-break.exp | 4 +- gdb/testsuite/gdb.mi/mi-nonstop-exit.exp | 106 + gdb/testsuite/gdb.mi/mi-simplerun.exp | 4 +- gdb/testsuite/gdb.mi/mi2-break.exp | 4 +- gdb/testsuite/gdb.mi/mi2-simplerun.exp | 4 +- .../mi-main.h => testsuite/gdb.mi/non-stop-exit.c} | 46 +- gdb/testsuite/gdb.python/python-cmd.exp | 26 + gdb/testsuite/gdb.python/python-function.exp | 79 + gdb/testsuite/gdb.python/python-value.exp | 3 + gdb/testsuite/lib/gdb.exp | 3 + gdb/thread.c | 101 +- gdb/top.c | 11 +- gdb/typeprint.c | 2 +- gdb/utils.c | 127 +- gdb/valops.c | 18 + gdb/valprint.c | 20 +- gdb/valprint.h | 5 +- gdb/value.c | 113 +- gdb/value.h | 28 +- gdb/version.in | 2 +- gdb/windows-nat.c | 350 ++- include/elf/ChangeLog | 4 + include/elf/common.h | 1 + libiberty/ChangeLog | 8 + libiberty/cp-demangle.c | 24 +- libiberty/testsuite/demangle-expected | 10 +- opcodes/ChangeLog | 4 + opcodes/i386-dis.c | 3 +- 178 files changed, 14119 insertions(+), 4060 deletions(-) create mode 100644 gdb/charset-list.h create mode 100644 gdb/doc/stack_frame.eps create mode 100644 gdb/doc/stack_frame.pdf create mode 100644 gdb/doc/stack_frame.png create mode 100644 gdb/doc/stack_frame.svg create mode 100644 gdb/doc/stack_frame.txt copy gdb/{mi/mi-main.h => gdb_usleep.c} (58%) copy gdb/{mi/mi-main.h => gdb_usleep.h} (58%) create mode 100644 gdb/gdb_wchar.h create mode 100644 gdb/python/python-function.c copy gdb/{mi/mi-main.h => testsuite/gdb.dwarf2/dw2-noloc-main.c} (55%) create mode 100644 gdb/testsuite/gdb.mi/mi-nonstop-exit.exp copy gdb/{mi/mi-main.h => testsuite/gdb.mi/non-stop-exit.c} (52%) create mode 100644 gdb/testsuite/gdb.python/python-function.exp First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index dc5454b..11a0acb 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,72 @@ +2009-03-26 Alan Modra + + PR 6494 + * elf.c (copy_elf_program_header): Do not check that PT_GNU_RELRO + p_filesz and p_memsz are equal. Use p_memsz as the segment size. + (assign_file_positions_for_non_load_sections): Zap PT_GNU_RELRO + if we don't find matching PT_LOAD when copying. + +2009-03-25 M R Swami Reddy + + * elf32-crx.c (crx_elf_howto_table): Zero the src_mask field of + the reloc descriptions. + +2009-03-25 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_relocate_section) + : Handle COMMON symbols. + : Ditto. + +2009-03-24 H.J. Lu + + * cpu-i386.c (bfd_x86_64_arch_intel_syntax): Make it static. + (bfd_i386_arch_intel_syntax): Likewise. + (i8086_arch): Likewise. + (bfd_x86_64_arch): Likewise. + +2009-03-24 Hans-Peter Nilsson + + * elf32-cris.c (cris_elf_relocate_section): : Allow use of non-local + symbols for non-allocated sections. Don't check whether to + generate R_CRIS_DTPMOD for non-allocated sections. + (cris_elf_gc_sweep_hook) : Don't + handle relocation GC:ing if applied to non-allocated section. + (cris_elf_check_relocs): Similar. + + * elf32-cris.c (cris_elf_relocate_section) + : Don't include the TLS size + when emitting a known TP offset in the GOT. + +2009-03-23 Alan Modra + + * elf64-ppc.c (synthetic_opd): Delete. + (compare_symbols): Look for .opd name rather than section match. + (ppc64_elf_get_synthetic_symtab): Likewise. + +2009-03-21 Alan Modra + + * elf32-ppc.c (is_pic_glink_stub): Delete. + (is_nonpic_glink_stub): New function. + (ppc_elf_get_synthetic_symtab): Check for last non-pic stub rather + than first pic one. + (struct ppc_elf_link_hash_table ): Comment fix. + +2009-03-20 Martin Schwidefsky + Andreas Krebbel + + * elf32-s390.c (elf_s390_check_relocs): Use the SYMBOL_* + macros for visibilty and locality checks. + (elf_s390_adjust_dynamic_symbol): Likewise. + (allocate_dynrelocs): Likewise. + (elf_s390_relocate_section): Likewise. + (elf_s390_finish_dynamic_symbol): Likewise. + * elf64-s390.c (elf_s390_check_relocs): Likewise. + (elf_s390_adjust_dynamic_symbol): Likewise. + (allocate_dynrelocs): Likewise. + (elf_s390_relocate_section): Likewise. + (elf_s390_finish_dynamic_symbol): Likewise. + 2009-03-19 Kai Tietz * bfd-in2.h: Regenerated. diff --git a/bfd/cpu-i386.c b/bfd/cpu-i386.c index 4001a05..952e659 100644 --- a/bfd/cpu-i386.c +++ b/bfd/cpu-i386.c @@ -23,7 +23,7 @@ #include "bfd.h" #include "libbfd.h" -const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = +static const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = { 64, /* 64 bits in a word */ 64, /* 64 bits in an address */ @@ -39,7 +39,7 @@ const bfd_arch_info_type bfd_x86_64_arch_intel_syntax = 0 }; -const bfd_arch_info_type bfd_i386_arch_intel_syntax = +static const bfd_arch_info_type bfd_i386_arch_intel_syntax = { 32, /* 32 bits in a word */ 32, /* 32 bits in an address */ @@ -55,7 +55,7 @@ const bfd_arch_info_type bfd_i386_arch_intel_syntax = &bfd_x86_64_arch_intel_syntax }; -const bfd_arch_info_type i8086_arch = +static const bfd_arch_info_type i8086_arch = { 32, /* 32 bits in a word */ 32, /* 32 bits in an address (well, not really) */ @@ -71,7 +71,7 @@ const bfd_arch_info_type i8086_arch = &bfd_i386_arch_intel_syntax }; -const bfd_arch_info_type bfd_x86_64_arch = +static const bfd_arch_info_type bfd_x86_64_arch = { 64, /* 32 bits in a word */ 64, /* 32 bits in an address */ diff --git a/bfd/elf.c b/bfd/elf.c index 6aa6d1c..720c8a1 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -4683,13 +4683,11 @@ assign_file_positions_for_non_load_sections (bfd *abfd, p->p_align = 1; p->p_flags = (lp->p_flags & ~PF_W); } - else if (link_info != NULL) + else { memset (p, 0, sizeof *p); p->p_type = PT_NULL; } - else - abort (); } else if (m->count != 0) { @@ -5838,14 +5836,13 @@ copy_elf_program_header (bfd *ibfd, bfd *obfd) map->p_align_valid = 1; map->p_vaddr_offset = 0; - if (map->p_type == PT_GNU_RELRO - && segment->p_filesz == segment->p_memsz) + if (map->p_type == PT_GNU_RELRO) { /* The PT_GNU_RELRO segment may contain the first a few bytes in the .got.plt section even if the whole .got.plt section isn't in the PT_GNU_RELRO segment. We won't change the size of the PT_GNU_RELRO segment. */ - map->p_size = segment->p_filesz; + map->p_size = segment->p_memsz; map->p_size_valid = 1; } diff --git a/bfd/elf32-cris.c b/bfd/elf32-cris.c index bd6de29..2037b10 100644 --- a/bfd/elf32-cris.c +++ b/bfd/elf32-cris.c @@ -1615,10 +1615,12 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, case R_CRIS_16_DTPREL: case R_CRIS_32_DTPREL: /* This relocation must only be performed against local - symbols. It's also ok when we link a program and the - symbol is defined in an ordinary (non-DSO) object (if - it's undefined there, we've already seen an error). */ + symbols, or to sections that are not loadable. It's also + ok when we link a program and the symbol is defined in an + ordinary (non-DSO) object (if it's undefined there, we've + already seen an error). */ if (h != NULL + && (input_section->flags & SEC_ALLOC) != 0 && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT && (info->shared || (!h->def_regular @@ -1641,14 +1643,16 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } - BFD_ASSERT (elf_cris_hash_table (info)->dtpmod_refcount != 0); + BFD_ASSERT ((input_section->flags & SEC_ALLOC) == 0 + || elf_cris_hash_table (info)->dtpmod_refcount != 0); /* Fill in a R_CRIS_DTPMOD reloc at offset 3 if we haven't already done so. Note that we do this in .got.plt, not in .got, as .got.plt contains the first part, still the reloc is against .got, because the linker script directs (is required to direct) them both into .got. */ - if (elf_cris_hash_table (info)->dtpmod_refcount > 0) + if (elf_cris_hash_table (info)->dtpmod_refcount > 0 + && (input_section->flags & SEC_ALLOC) != 0) { asection *sgotplt = bfd_get_section_by_name (dynobj, ".got.plt"); BFD_ASSERT (sgotplt != NULL); @@ -1729,15 +1733,15 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, return FALSE; } - if (!info->shared && (h == NULL || h->def_regular)) + if (!info->shared + && (h == NULL || h->def_regular || ELF_COMMON_DEF_P (h))) { /* Known contents of the GOT. */ bfd_vma off; /* The symbol is defined in the program, so just write - (1, -prog_tls_size+known_tpoffset) into the GOT. */ + (1, known_tpoffset) into the GOT. */ relocation -= elf_hash_table (info)->tls_sec->vma; - relocation -= elf_hash_table (info)->tls_size; if (h != NULL) { @@ -1997,7 +2001,7 @@ cris_elf_relocate_section (output_bfd, info, input_bfd, input_section, if (h != NULL && ELF_ST_VISIBILITY (h->other) == STV_DEFAULT - && !h->def_regular + && !(h->def_regular || ELF_COMMON_DEF_P (h)) /* If it's undefined, then an error message has already been emitted. */ && h->root.type != bfd_link_hash_undefined) @@ -2685,6 +2689,10 @@ cris_elf_gc_sweep_hook (bfd *abfd, break; case R_CRIS_32_DTPREL: + /* This'd be a .dtpreld entry in e.g. debug info. */ + if ((sec->flags & SEC_ALLOC) == 0) + break; + /* Fall through. */ case R_CRIS_16_DTPREL: elf_cris_hash_table (info)->dtpmod_refcount--; if (elf_cris_hash_table (info)->dtpmod_refcount == 0) @@ -3152,8 +3160,17 @@ cris_elf_check_relocs (abfd, info, sec, relocs) on the first input bfd we found that contained dynamic relocs. */ switch (r_type) { - case R_CRIS_16_DTPREL: case R_CRIS_32_DTPREL: + if ((sec->flags & SEC_ALLOC) == 0) + /* This'd be a .dtpreld entry in e.g. debug info. We have + several different switch statements below, but none of + that is needed; we need no preparations for resolving + R_CRIS_32_DTPREL into a non-allocated section (debug + info), so let's just move on to the next + relocation. */ + continue; + /* Fall through. */ + case R_CRIS_16_DTPREL: /* The first .got.plt entry is right after the R_CRIS_DTPMOD entry at index 3. */ if (elf_cris_hash_table (info)->dtpmod_refcount == 0) diff --git a/bfd/elf32-crx.c b/bfd/elf32-crx.c index b0db783..54eea93 100644 --- a/bfd/elf32-crx.c +++ b/bfd/elf32-crx.c @@ -104,7 +104,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL4", /* name */ FALSE, /* partial_inplace */ - 0xf, /* src_mask */ + 0x0, /* src_mask */ 0xf, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -118,7 +118,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL8", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -132,7 +132,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL8_CMP", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -146,7 +146,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -160,7 +160,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL24", /* name */ FALSE, /* partial_inplace */ - 0xffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -174,7 +174,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REL32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -188,7 +188,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL12", /* name */ FALSE, /* partial_inplace */ - 0xfff, /* src_mask */ + 0x0, /* src_mask */ 0xfff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -202,7 +202,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL22", /* name */ FALSE, /* partial_inplace */ - 0x3fffff, /* src_mask */ + 0x0, /* src_mask */ 0x3fffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -216,7 +216,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL28", /* name */ FALSE, /* partial_inplace */ - 0xfffffff, /* src_mask */ + 0x0, /* src_mask */ 0xfffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -230,7 +230,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_REGREL32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -244,7 +244,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_ABS16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -258,7 +258,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_ABS32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -272,7 +272,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM8", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -286,7 +286,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -300,7 +300,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_NUM32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -314,7 +314,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_IMM16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -328,7 +328,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_IMM32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ FALSE), /* pcrel_offset */ @@ -345,7 +345,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH8", /* name */ FALSE, /* partial_inplace */ - 0xff, /* src_mask */ + 0x0, /* src_mask */ 0xff, /* dst_mask */ TRUE), /* pcrel_offset */ @@ -362,7 +362,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH16", /* name */ FALSE, /* partial_inplace */ - 0xffff, /* src_mask */ + 0x0, /* src_mask */ 0xffff, /* dst_mask */ TRUE), /* pcrel_offset */ @@ -379,7 +379,7 @@ static reloc_howto_type crx_elf_howto_table[] = bfd_elf_generic_reloc, /* special_function */ "R_CRX_SWITCH32", /* name */ FALSE, /* partial_inplace */ - 0xffffffff, /* src_mask */ + 0x0, /* src_mask */ 0xffffffff, /* dst_mask */ TRUE) /* pcrel_offset */ }; diff --git a/bfd/elf32-ppc.c b/bfd/elf32-ppc.c index 5db64b0..e15f88e 100644 --- a/bfd/elf32-ppc.c +++ b/bfd/elf32-ppc.c @@ -2328,26 +2328,17 @@ ppc_elf_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED) } static bfd_boolean -is_pic_glink_stub (bfd *abfd, asection *glink, bfd_vma off) +is_nonpic_glink_stub (bfd *abfd, asection *glink, bfd_vma off) { - bfd_byte buf[16]; - unsigned int insn; + bfd_byte buf[GLINK_ENTRY_SIZE]; - if (!bfd_get_section_contents (abfd, glink, buf, off, 16)) + if (!bfd_get_section_contents (abfd, glink, buf, off, GLINK_ENTRY_SIZE)) return FALSE; - insn = bfd_get_32 (abfd, buf); - if ((insn & 0xffff0000) == LWZ_11_30 - && bfd_get_32 (abfd, buf + 4) == MTCTR_11 - && bfd_get_32 (abfd, buf + 8) == BCTR) - return TRUE; - - if ((insn & 0xffff0000) == ADDIS_11_30 - && (bfd_get_32 (abfd, buf + 4) & 0xffff0000) == LWZ_11_11 - && bfd_get_32 (abfd, buf + 8) == MTCTR_11 - && bfd_get_32 (abfd, buf + 12) == BCTR) - return TRUE; - return FALSE; + return ((bfd_get_32 (abfd, buf + 0) & 0xffff0000) == LIS_11 + && (bfd_get_32 (abfd, buf + 4) & 0xffff0000) == LWZ_11_11 + && bfd_get_32 (abfd, buf + 8) == MTCTR_11 + && bfd_get_32 (abfd, buf + 12) == BCTR); } static bfd_boolean @@ -2484,10 +2475,8 @@ ppc_elf_get_synthetic_symtab (bfd *abfd, long symcount, asymbol **syms, multiple stubs for each plt entry. If that is the case then there is no way to associate stubs with their plt entries short of figuring out the GOT pointer value used in the stub. */ - if (!bfd_get_section_contents (abfd, glink, buf, - stub_vma - glink->vma, 4) - || ((bfd_get_32 (abfd, buf) & 0xffff0000) != LIS_11 - && is_pic_glink_stub (abfd, glink, stub_vma - glink->vma - 16))) + if (!is_nonpic_glink_stub (abfd, glink, + glink_vma - GLINK_ENTRY_SIZE - glink->vma)) return 0; slurp_relocs = get_elf_backend_data (abfd)->s->slurp_reloc_table; @@ -2722,7 +2711,7 @@ struct ppc_elf_link_hash_table bfd_vma offset; } tlsld_got; - /* Offset of PltResolve function in glink. */ + /* Offset of branch table to PltResolve function in glink. */ bfd_vma glink_pltresolve; /* Size of reserved GOT entries. */ diff --git a/bfd/elf32-s390.c b/bfd/elf32-s390.c index 7aadadc..14c4cb0 100644 --- a/bfd/elf32-s390.c +++ b/bfd/elf32-s390.c @@ -1261,7 +1261,7 @@ elf_s390_check_relocs (abfd, info, sec, relocs) && ELF32_R_TYPE (rel->r_info) != R_390_PC32DBL hooks/post-receive -- Repository for Project Archer.