From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31711 invoked by alias); 12 Jul 2011 20:00:42 -0000 Mailing-List: contact archer-commits-help@sourceware.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Subscribe: Received: (qmail 31648 invoked by uid 9674); 12 Jul 2011 20:00:41 -0000 Date: Tue, 12 Jul 2011 20:00:00 -0000 Message-ID: <20110712200041.31633.qmail@sourceware.org> From: jkratoch@sourceware.org To: archer-commits@sourceware.org Subject: [SCM] archer-jankratochvil-entryval: Merge remote-tracking branch 'gdb/master' into archer-jankratochvil-entryval X-Git-Refname: refs/heads/archer-jankratochvil-entryval X-Git-Reftype: branch X-Git-Oldrev: f15cec06e871b143722a75ae8bf4f6fb72c16b55 X-Git-Newrev: 54a00507e4d31533f64a6d4904a05ebe69c5b4a6 X-SW-Source: 2011-q3/txt/msg00021.txt.bz2 List-Id: The branch, archer-jankratochvil-entryval has been updated via 54a00507e4d31533f64a6d4904a05ebe69c5b4a6 (commit) via b3de10b16493db76c499d759691cdd75c25a376e (commit) via d80c734110e0923e65b1d55e9d1c593e71af8a68 (commit) via cb53181e94b0910c67910adce70e69086d5ee0a1 (commit) via d086d10e7e4a7efe89b4f7facd9240ffb0dc1312 (commit) via a6e18163f39e0d8432fb6407c833067498c1e16b (commit) via 814ebff94c3ab7b6aafbbb281b13d5003bb6e253 (commit) via 3fbb676961751f4c388a39ec57a082223a0e6cbd (commit) via b0d69d3cfe69ee610c7a3a32fc033f54d2c8312a (commit) via a9ebd6673b5dc9d08e7b88cfd6f81bc92a28bc68 (commit) via 7bd518fd9738c50a5197af2b184acd97e4d4df40 (commit) via 35a5e6fd4ebc16e8b08dcad7a93206913237f014 (commit) via 844225ae043315e51de93011829fbc92e130c4fe (commit) via 096bc64b0669d08947294daf79d7576288fd77db (commit) via ba52ef129052b3036188734d0783b1a772897e8e (commit) via 4a4c3c574db12e265dc829bb967ff14f62c095a4 (commit) via 5761123dc0b69a89f940e8894f5f8f7bd1d9574a (commit) via 1def77069162fe168a472733759ce94f223b75cf (commit) via 5f3da32a5e1b2b36a1a5a352b80289f5cb0e3da4 (commit) via bcfa5b4631463732b94e697a607d2b2b1fbef27f (commit) via 1a22912eeec35903c13195b7ce5ad18401c19af0 (commit) via 08369ee371ee74f55ca6fd16ccee1b88985132d8 (commit) via 417fab5d1ae189d7d3f30515560927884057939b (commit) via 693423e7f7958112c723289855179e05bee273bb (commit) via d8e82ca581adc62de2d816cbe06c4ff87b1444a9 (commit) from f15cec06e871b143722a75ae8bf4f6fb72c16b55 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email. - Log ----------------------------------------------------------------- commit 54a00507e4d31533f64a6d4904a05ebe69c5b4a6 Merge: b3de10b d80c734 Author: Jan Kratochvil Date: Tue Jul 12 22:00:25 2011 +0200 Merge remote-tracking branch 'gdb/master' into archer-jankratochvil-entryval Conflicts: gdb/dwarf2loc.c commit b3de10b16493db76c499d759691cdd75c25a376e Author: Jan Kratochvil Date: Tue Jul 12 21:56:58 2011 +0200 dwarf2_fetch_die_attr_block commit d80c734110e0923e65b1d55e9d1c593e71af8a68 Author: Nick Clifton Date: Tue Jul 12 15:17:41 2011 +0000 * elf32-arm.c (elf32_arm_section_flags): Delete. (elf_backend_section_flags): Remove. commit cb53181e94b0910c67910adce70e69086d5ee0a1 Author: Nick Clifton Date: Tue Jul 12 08:45:44 2011 +0000 * arm-dis.c (print_insn_arm): Revert previous, undocumented, accidental change. commit d086d10e7e4a7efe89b4f7facd9240ffb0dc1312 Author: Alan Modra Date: Tue Jul 12 00:00:06 2011 +0000 daily update commit a6e18163f39e0d8432fb6407c833067498c1e16b Author: gdbadmin Date: Tue Jul 12 00:00:03 2011 +0000 *** empty log message *** commit 814ebff94c3ab7b6aafbbb281b13d5003bb6e253 Author: Mike Frysinger Date: Mon Jul 11 19:00:17 2011 +0000 sim: m32c/rx: rename configure.in to match rest of the tree The sim dir has 30 configure.ac files and 2 configure.in files. So rename the minority to be consistent. Signed-off-by: Mike Frysinger commit 3fbb676961751f4c388a39ec57a082223a0e6cbd Author: Mike Frysinger Date: Mon Jul 11 18:45:45 2011 +0000 sim: m32c/rx: fix typo in copyright updating commit b0d69d3cfe69ee610c7a3a32fc033f54d2c8312a Author: H.J. Lu Date: Mon Jul 11 18:39:12 2011 +0000 Also skip BFD_PLUGIN when setting stack_flags. 2011-07-11 H.J. Lu PR ld/12982 * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN when setting stack_flags. commit a9ebd6673b5dc9d08e7b88cfd6f81bc92a28bc68 Author: Tom Tromey Date: Mon Jul 11 17:19:14 2011 +0000 * regcache.c (struct regcache_descr): Fix typo. * i387-tdep.c (i387_supply_xsave): Fix typo. commit 7bd518fd9738c50a5197af2b184acd97e4d4df40 Author: Tom Tromey Date: Mon Jul 11 17:17:25 2011 +0000 * dwarf2read.c (handle_DW_AT_stmt_list): New function. (read_file_scope, read_type_unit_scope): Use it. commit 35a5e6fd4ebc16e8b08dcad7a93206913237f014 Author: Catherine Moore Date: Mon Jul 11 15:03:02 2011 +0000 include/ChangeLog 2011-07-11 Catherine Moore * bfdlink.h (flag_type): New enumeration. (flag_info_list): New structure. (flag_info): New structure. bfd/ChangeLog 2011-07-11 Catherine Moore * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition. * aout-target.h (MY_bfd_lookup_section_flags): New definition. * aout-tic30.c (MY_bfd_lookup_section_flags): New definition. * bfd-in2.h: Regenerated. * bfd.c (bfd_lookup_section_flags): New definition. * binary.c (binary_bfd_lookup_section_flags): New definition. * bout.c (b_out_bfd_lookup_section_flags): New definition. * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition. * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition. * coff-rs6000.c (rs6000coff_vec): Include bfd_generic_lookup_section_flags. (pmac_xcoff_vec): Likewise. * coffcode.h (coff_bfd_lookup_section_flags): New definition. * coff64-rs6000.c (rs6000coff64_vec): Include bfd_generic_lookup_section_flags. (aix5coff64_vec): Likewise. * ecoff.c (bfd_debug_section): Initialize flag_info field. * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare. (bfd_elf_lookup_section_flags): Declare. * elflink.c (bfd_elf_lookup_section_flags): New function. * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define. (elf_backend_lookup_section_flags_hook): Define. (elf_backend_data): Add elf_backend_lookup_section_flags_hook. * i386msdos.c (msdos_bfd_lookup_section_flags): New define. * i386os9k.c (os9k_bfd_lookup_section_flags): New define. * ieee.c (ieee_bfd_lookup_section_flags): New define. * ihex.c (ihex_bfd_lookup_section_flags): New define. * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare. (bfd_generic_lookup_section_flags): Declare. * libbfd.h: Regenerated. * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New. * mmo.c (mmo_bfd_lookup_section_flags): New definition. * nlm-target.h (nlm_bfd_lookup_section_flags): New definition. * oasys.c (oasys_bfd_lookup_section_flags): New definition. * pef.c (bfd_pef_bfd_lookup_section_flags): New definition. * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition. * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition. * reloc.c (bfd_generic_lookup_section_flags): New function. * som.c (som_bfd_lookup_section_flags): New definition. * srec.c (srec_bfd_lookup_section_flags): New definition. * targets.c (flag_info): Declare. (NAME##_bfd_lookup_section_flags): Add to LINK jump table. (_bfd_lookup_section_flags): New. * tekhex.c (tekhex_bfd_lookup_section_flags): New definition. * versados.c (versados_bfd_lookup_section_flags): New definition. * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition. * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition. ld/ChangeLog 2011-07-11 Catherine Moore * ld.h (section_flag_list): Add field to struct wildcard_spec. * ld.texinfo (INPUT_SECTION_FLAGS): Document. * ldgram.y (flag_info_list, flag_info): Add to union. (INPUT_SECTION_FLAGS): New token. (wildcard_spec): Initialize section_flag_list to NULL for each alternative. (sect_flag_list, sect_flags): New rules. (input_section_spec_no_keep): Add alternatives to recognize sect_flags. * ldlang.c (walk_wild_consider_section): Initialize section_flag_info field of the section struct. (lang_add_section): Check input section flags. (lang_add_wild): Initialize section_flag_list field of the statement struct. * ldlang.h (lang_input_statement_struct): Add section_flag_list field. (lang_wild_statement_struct): Likewise. * ldlex.l (INPUT_SECTION_FLAGS): New token. * mri.c (mri_draw_tree): Initialize section_flag_list to NULL. * NEWS: Announce INPUT_SECTION_FLAGS enhancement. ld/testsuite/ChangeLog 2011-07-11 Catherine Moore * ld-scripts/section-flags-1.s: New. * ld-scripts/section-flags-1.t: New. * ld-scripts/section-flags-2.s: New. * ld-scripts/section-flags-2.t: New. * ld-scripts/section-flags.exp: New. commit 844225ae043315e51de93011829fbc92e130c4fe Author: H.J. Lu Date: Mon Jul 11 13:54:51 2011 +0000 Fix a typo in elfnn-ia64.c (count_dyn_reloc). 2011-07-11 H.J. Lu PR ld/12978 * elfnn-ia64.c (count_dyn_reloc): Fix a typo. commit 096bc64b0669d08947294daf79d7576288fd77db Author: Jan Kratochvil Date: Mon Jul 11 13:40:23 2011 +0000 gdb/ * dwarf2expr.c (read_sleb128): Fix signed extension overflowing host `int'. gdb/testsuite/ * gdb.dwarf2/dw2-const.S (Pointer size): Change from 4 to 8. (DW_AT_high_pc, DW_AT_low_pc): Remove them. (val8, .Ltype_const8, .Ltype_int8, DW_TAG_variable): New. * gdb.dwarf2/dw2-const.exp (print/x val8): New test. commit ba52ef129052b3036188734d0783b1a772897e8e Author: pmuldoon Date: Mon Jul 11 13:07:36 2011 +0000 2011-07-11 Phil Muldoon PR python/12438 * python/python.c: Set gdbpy_should_print_stack default to off. (set_python): Deprecate maint set python print-stack to class_deprecate. (_initialize_python): Deprecate maint set/show python print-stack. Add new prefix command, python. Add new setting, print-backtrace. * NEWS: Document set python print-stack. Document default change. 2011-07-11 Phil Muldoon PR python/12438 * gdb.texinfo (Python Commands): Add deprecate note to maint set/show python print-stack. Document set/show python print-backtrace. 2011-07-11 Phil Muldoon PR python/12438 * gdb.python/python.exp: Add maint set/show python print-stack deprecated tests. Add set/show python print-backtrace tests. commit 4a4c3c574db12e265dc829bb967ff14f62c095a4 Author: pmuldoon Date: Mon Jul 11 12:10:06 2011 +0000 2011-07-11 Phil Muldoon * python/py-inferior.c (infpy_dealloc): New function. (inferior_to_inferior_object): Return a new object, or a new reference to the existing object. (find_thread_object): Cleanup references to inferior. (delete_thread_object): Ditto. * python/py-infthread.c (create_thread_object): Do not increment inferior reference count. commit 5761123dc0b69a89f940e8894f5f8f7bd1d9574a Author: Alan Modra Date: Mon Jul 11 00:00:05 2011 +0000 daily update commit 1def77069162fe168a472733759ce94f223b75cf Author: gdbadmin Date: Mon Jul 11 00:00:03 2011 +0000 *** empty log message *** commit 5f3da32a5e1b2b36a1a5a352b80289f5cb0e3da4 Author: Alan Modra Date: Sun Jul 10 00:00:05 2011 +0000 daily update commit bcfa5b4631463732b94e697a607d2b2b1fbef27f Author: gdbadmin Date: Sun Jul 10 00:00:03 2011 +0000 *** empty log message *** commit 1a22912eeec35903c13195b7ce5ad18401c19af0 Author: Alan Modra Date: Sat Jul 9 06:20:50 2011 +0000 PR ld/12942 bfd/ * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section rather than kept_section to determine whether a symbol is from a discarded section. * cofflink.c (coff_link_add_symbols): Make symbols from discarded sections appear undefined. * elf-bfd.h (_bfd_elf_section_already_linked): Replace "asection *" with "struct already_linked *". * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise. (_bfd_generic_section_already_linked): Likewise. (bfd_section_already_linked_table_insert): Likewise. (struct already_linked): New. (struct bfd_section_already_linked): Use it. * elflink.c (_bfd_elf_section_already_linked): Replace. "asection *" with "struct already_linked *". Replace the plugin dummy with the LTO output. * linker.c (_bfd_generic_section_already_linked): Likewise. * targets.c (struct already_linked): Add forward declaration. (bfd_target): Replace "struct bfd_section *" with "struct already_linked *" in _section_already_linked. * bfd-in2.h: Regenerate. * libbfd.h: Regenerate. include/ * bfdlink.h (bfd_link_info): Add loading_lto_outputs. ld/ * ldlang.c (section_already_linked): Pass "struct already_linked *" to bfd_section_already_linked. (lang_process): Set link_info.loading_lto_outputs before loading LTO outputs. * plugin.c: Include "libbfd.h". (add_symbols): Call bfd_section_already_linked with comdat_key. commit 08369ee371ee74f55ca6fd16ccee1b88985132d8 Author: Alan Modra Date: Sat Jul 9 00:00:06 2011 +0000 daily update commit 417fab5d1ae189d7d3f30515560927884057939b Author: gdbadmin Date: Sat Jul 9 00:00:02 2011 +0000 *** empty log message *** commit 693423e7f7958112c723289855179e05bee273bb Author: Tom Tromey Date: Fri Jul 8 19:54:53 2011 +0000 * dwarf2loc.c (locexpr_regname): New function. (locexpr_describe_location_piece): Use it. (disassemble_dwarf_expression): Add per_cu argument. Use locexpr_regname. : New cases. (locexpr_describe_location_1): Add per_cu argument. (locexpr_describe_location): Update. (loclist_describe_location): Update. commit d8e82ca581adc62de2d816cbe06c4ff87b1444a9 Author: Tom Tromey Date: Fri Jul 8 16:02:57 2011 +0000 * dwarf2expr.c (execute_stack_op): Add QUIT. ----------------------------------------------------------------------- Summary of changes: bfd/ChangeLog | 95 ++++++ bfd/aout-adobe.c | 1 + bfd/aout-target.h | 3 + bfd/aout-tic30.c | 3 + bfd/bfd-in2.h | 27 ++- bfd/bfd.c | 3 + bfd/binary.c | 1 + bfd/bout.c | 1 + bfd/coff-alpha.c | 3 + bfd/coff-mips.c | 3 + bfd/coff-rs6000.c | 2 + bfd/coff64-rs6000.c | 2 + bfd/coffcode.h | 4 + bfd/cofflink.c | 6 +- bfd/ecoff.c | 2 + bfd/elf-bfd.h | 10 +- bfd/elf32-arm.c | 12 - bfd/elflink.c | 409 +++++++++++++++++++-------- bfd/elfnn-ia64.c | 2 +- bfd/elfxx-target.h | 8 + bfd/i386msdos.c | 1 + bfd/i386os9k.c | 1 + bfd/ieee.c | 1 + bfd/ihex.c | 1 + bfd/libbfd-in.h | 22 ++- bfd/libbfd.h | 25 ++- bfd/linker.c | 127 ++++++--- bfd/mach-o-target.c | 1 + bfd/mmo.c | 1 + bfd/nlm-target.h | 1 + bfd/oasys.c | 1 + bfd/pef.c | 1 + bfd/plugin.c | 1 + bfd/ppcboot.c | 1 + bfd/reloc.c | 24 ++ bfd/section.c | 6 + bfd/som.c | 1 + bfd/srec.c | 1 + bfd/targets.c | 11 +- bfd/tekhex.c | 1 + bfd/versados.c | 1 + bfd/version.h | 2 +- bfd/vms-alpha.c | 1 + bfd/xsym.c | 1 + gdb/ChangeLog | 52 ++++ gdb/NEWS | 5 + gdb/doc/ChangeLog | 7 + gdb/doc/gdb.texinfo | 13 +- gdb/dwarf2expr.c | 6 +- gdb/dwarf2loc.c | 132 +++++++-- gdb/dwarf2loc.h | 4 +- gdb/dwarf2read.c | 63 +++-- gdb/i387-tdep.c | 2 +- gdb/python/py-inferior.c | 59 +++- gdb/python/py-infthread.c | 1 - gdb/python/python.c | 81 +++++- gdb/regcache.c | 2 +- gdb/testsuite/ChangeLog | 13 + gdb/testsuite/gdb.dwarf2/dw2-const.S | 53 +++- gdb/testsuite/gdb.dwarf2/dw2-const.exp | 1 + gdb/testsuite/gdb.python/py-function.exp | 1 + gdb/testsuite/gdb.python/py-prettyprint.exp | 1 + gdb/testsuite/gdb.python/python.exp | 15 + gdb/version.in | 2 +- include/ChangeLog | 11 + include/bfdlink.h | 23 ++ include/elf/ppc.h | 4 + opcodes/ChangeLog | 5 + opcodes/arm-dis.c | 3 - sim/m32c/ChangeLog | 8 + sim/m32c/{configure.in => configure.ac} | 2 +- sim/rx/ChangeLog | 8 + sim/rx/{configure.in => configure.ac} | 2 +- 73 files changed, 1117 insertions(+), 293 deletions(-) rename sim/m32c/{configure.in => configure.ac} (97%) rename sim/rx/{configure.in => configure.ac} (98%) First 500 lines of diff: diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 9a3dafb..be2cea2 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,98 @@ +2011-07-12 Nick Clifton + + * elf32-arm.c (elf32_arm_section_flags): Delete. + (elf_backend_section_flags): Remove. + +2011-07-11 H.J. Lu + + PR ld/12982 + * elflink.c (bfd_elf_size_dynamic_sections): Also skip BFD_PLUGIN + when setting stack_flags. + +2011-07-11 Catherine Moore + + * aout-adobe.c (aout_32_bfd_lookup_section_flags): New definition. + * aout-target.h (MY_bfd_lookup_section_flags): New definition. + * aout-tic30.c (MY_bfd_lookup_section_flags): New definition. + * bfd-in2.h: Regenerated. + * bfd.c (bfd_lookup_section_flags): New definition. + * binary.c (binary_bfd_lookup_section_flags): New definition. + * bout.c (b_out_bfd_lookup_section_flags): New definition. + * coff-alpha.c (_bfd_ecoff_bfd_lookup_section_flags): New definition. + * coff-mips.c (_bfd_ecoff_bfd_lookup_section_flags): New definition. + * coff-rs6000.c (rs6000coff_vec): Include + bfd_generic_lookup_section_flags. + (pmac_xcoff_vec): Likewise. + * coffcode.h (coff_bfd_lookup_section_flags): New definition. + * coff64-rs6000.c (rs6000coff64_vec): Include + bfd_generic_lookup_section_flags. + (aix5coff64_vec): Likewise. + * ecoff.c (bfd_debug_section): Initialize flag_info field. + * elf-bfd.h (elf_backend_lookup_section_flags_hook): Declare. + (bfd_elf_lookup_section_flags): Declare. + * elflink.c (bfd_elf_lookup_section_flags): New function. + * elfxx-target.h (bfd_elfNN_bfd_lookup_section_flags): Define. + (elf_backend_lookup_section_flags_hook): Define. + (elf_backend_data): Add elf_backend_lookup_section_flags_hook. + * i386msdos.c (msdos_bfd_lookup_section_flags): New define. + * i386os9k.c (os9k_bfd_lookup_section_flags): New define. + * ieee.c (ieee_bfd_lookup_section_flags): New define. + * ihex.c (ihex_bfd_lookup_section_flags): New define. + * libbfd-in.h (_bfd_nolink_bfd_lookup_section_flags): Declare. + (bfd_generic_lookup_section_flags): Declare. + * libbfd.h: Regenerated. + * mach-o-target.c (bfd_mach_o_bfd_lookup_section_flags): New. + * mmo.c (mmo_bfd_lookup_section_flags): New definition. + * nlm-target.h (nlm_bfd_lookup_section_flags): New definition. + * oasys.c (oasys_bfd_lookup_section_flags): New definition. + * pef.c (bfd_pef_bfd_lookup_section_flags): New definition. + * plugin.c (bfd_plugin_bfd_lookup_section_flags): New definition. + * ppcboot.c (ppcboot_bfd_lookup_section_flags): New definition. + * reloc.c (bfd_generic_lookup_section_flags): New function. + * som.c (som_bfd_lookup_section_flags): New definition. + * srec.c (srec_bfd_lookup_section_flags): New definition. + * targets.c (flag_info): Declare. + (NAME##_bfd_lookup_section_flags): Add to LINK jump table. + (_bfd_lookup_section_flags): New. + * tekhex.c (tekhex_bfd_lookup_section_flags): New definition. + * versados.c (versados_bfd_lookup_section_flags): New definition. + * vms-alpha.c (alpha_vms_bfd_lookup_section_flag): New definition. + * xsym.c (bfd_sym_bfd_lookup_section_flags): New definition. + +2011-07-11 H.J. Lu + + PR ld/12978 + * elfnn-ia64.c (count_dyn_reloc): Fix a typo. + +2011-07-09 Alan Modra + + PR ld/12942 + * elflink.c (elf_link_add_object_symbols): Use elf_discarded_section + rather than kept_section to determine whether a symbol is from + a discarded section. + * cofflink.c (coff_link_add_symbols): Make symbols from discarded + sections appear undefined. + +2011-07-09 H.J. Lu + + PR ld/12942 + * elf-bfd.h (_bfd_elf_section_already_linked): Replace + "asection *" with "struct already_linked *". + * libbfd-in.h (_bfd_nolink_section_already_linked): Likewise. + (_bfd_generic_section_already_linked): Likewise. + (bfd_section_already_linked_table_insert): Likewise. + (struct already_linked): New. + (struct bfd_section_already_linked): Use it. + * elflink.c (_bfd_elf_section_already_linked): Replace. + "asection *" with "struct already_linked *". Replace the plugin + dummy with the LTO output. + * linker.c (_bfd_generic_section_already_linked): Likewise. + * targets.c (struct already_linked): Add forward declaration. + (bfd_target): Replace "struct bfd_section *" with + "struct already_linked *" in _section_already_linked. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + 2011-07-06 Tristan Gingold * mach-o.h: Move loader related definitions to diff --git a/bfd/aout-adobe.c b/bfd/aout-adobe.c index bd38ea8..c8331d8 100644 --- a/bfd/aout-adobe.c +++ b/bfd/aout-adobe.c @@ -459,6 +459,7 @@ aout_adobe_sizeof_headers (bfd *ignore_abfd ATTRIBUTE_UNUSED, #define aout_32_get_section_contents_in_window _bfd_generic_get_section_contents_in_window #define aout_32_bfd_relax_section bfd_generic_relax_section #define aout_32_bfd_gc_sections bfd_generic_gc_sections +#define aout_32_bfd_lookup_section_flags bfd_generic_lookup_section_flags #define aout_32_bfd_merge_sections bfd_generic_merge_sections #define aout_32_bfd_is_group_section bfd_generic_is_group_section #define aout_32_bfd_discard_group bfd_generic_discard_group diff --git a/bfd/aout-target.h b/bfd/aout-target.h index 5c0d2ae..f6e8bd2 100644 --- a/bfd/aout-target.h +++ b/bfd/aout-target.h @@ -486,6 +486,9 @@ MY_bfd_final_link (bfd *abfd, struct bfd_link_info *info) #ifndef MY_bfd_gc_sections #define MY_bfd_gc_sections bfd_generic_gc_sections #endif +#ifndef MY_bfd_lookup_section_flags +#define MY_bfd_lookup_section_flags bfd_generic_lookup_section_flags +#endif #ifndef MY_bfd_merge_sections #define MY_bfd_merge_sections bfd_generic_merge_sections #endif diff --git a/bfd/aout-tic30.c b/bfd/aout-tic30.c index 30900ba..0b01177 100644 --- a/bfd/aout-tic30.c +++ b/bfd/aout-tic30.c @@ -944,6 +944,9 @@ tic30_aout_set_arch_mach (bfd *abfd, #ifndef MY_bfd_gc_sections #define MY_bfd_gc_sections bfd_generic_gc_sections #endif +#ifndef MY_bfd_lookup_section_flags +#define MY_bfd_lookup_section_flags bfd_generic_lookup_section_flags +#endif #ifndef MY_bfd_merge_sections #define MY_bfd_merge_sections bfd_generic_merge_sections #endif diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 672c293..867d052 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -1514,6 +1514,9 @@ typedef struct bfd_section /* The BFD which owns the section. */ bfd *owner; + /* INPUT_SECTION_FLAGS if specified in the linker script. */ + struct flag_info *section_flag_info; + /* A symbol which points at this section only. */ struct bfd_symbol *symbol; struct bfd_symbol **symbol_ptr_ptr; @@ -1692,6 +1695,9 @@ extern asection bfd_ind_section; /* target_index, used_by_bfd, constructor_chain, owner, */ \ 0, NULL, NULL, NULL, \ \ + /* flag_info, */ \ + NULL, \ + \ /* symbol, symbol_ptr_ptr, */ \ (struct bfd_symbol *) SYM, &SEC.symbol, \ \ @@ -5571,6 +5577,9 @@ bfd_boolean bfd_set_private_flags (bfd *abfd, flagword flags); #define bfd_gc_sections(abfd, link_info) \ BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) +#define bfd_lookup_section_flags(link_info, flag_info) \ + BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info)) + #define bfd_merge_sections(abfd, link_info) \ BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) @@ -5726,6 +5735,10 @@ enum bfd_endian { BFD_ENDIAN_BIG, BFD_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN }; /* Forward declaration. */ typedef struct bfd_link_info _bfd_link_info; +struct already_linked; + +/* Forward declaration. */ +typedef struct flag_info flag_info; typedef struct bfd_target { @@ -5996,6 +6009,7 @@ typedef struct bfd_target NAME##_bfd_final_link, \ NAME##_bfd_link_split_section, \ NAME##_bfd_gc_sections, \ + NAME##_bfd_lookup_section_flags, \ NAME##_bfd_merge_sections, \ NAME##_bfd_is_group_section, \ NAME##_bfd_discard_group, \ @@ -6040,6 +6054,10 @@ typedef struct bfd_target /* Remove sections that are not referenced from the output. */ bfd_boolean (*_bfd_gc_sections) (bfd *, struct bfd_link_info *); + /* Sets the bitmask of allowed and disallowed section flags. */ + void (*_bfd_lookup_section_flags) (struct bfd_link_info *, + struct flag_info *); + /* Attempt to merge SEC_MERGE sections. */ bfd_boolean (*_bfd_merge_sections) (bfd *, struct bfd_link_info *); @@ -6051,7 +6069,7 @@ typedef struct bfd_target /* Check if SEC has been already linked during a reloceatable or final link. */ - void (*_section_already_linked) (bfd *, struct bfd_section *, + void (*_section_already_linked) (bfd *, struct already_linked *, struct bfd_link_info *); /* Define a common symbol. */ @@ -6121,11 +6139,12 @@ bfd_boolean bfd_link_split_section (bfd *abfd, asection *sec); #define bfd_link_split_section(abfd, sec) \ BFD_SEND (abfd, _bfd_link_split_section, (abfd, sec)) -void bfd_section_already_linked (bfd *abfd, asection *sec, +void bfd_section_already_linked (bfd *abfd, + struct already_linked *data, struct bfd_link_info *info); -#define bfd_section_already_linked(abfd, sec, info) \ - BFD_SEND (abfd, _section_already_linked, (abfd, sec, info)) +#define bfd_section_already_linked(abfd, data, info) \ + BFD_SEND (abfd, _section_already_linked, (abfd, data, info)) bfd_boolean bfd_generic_define_common_symbol (bfd *output_bfd, struct bfd_link_info *info, diff --git a/bfd/bfd.c b/bfd/bfd.c index b3e2c47..7c14c7a 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -1374,6 +1374,9 @@ DESCRIPTION .#define bfd_gc_sections(abfd, link_info) \ . BFD_SEND (abfd, _bfd_gc_sections, (abfd, link_info)) . +.#define bfd_lookup_section_flags(link_info, flag_info) \ +. BFD_SEND (abfd, _bfd_lookup_section_flags, (link_info, flag_info)) +. .#define bfd_merge_sections(abfd, link_info) \ . BFD_SEND (abfd, _bfd_merge_sections, (abfd, link_info)) . diff --git a/bfd/binary.c b/bfd/binary.c index ad93354..700c862 100644 --- a/bfd/binary.c +++ b/bfd/binary.c @@ -299,6 +299,7 @@ binary_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED, #define binary_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents #define binary_bfd_relax_section bfd_generic_relax_section #define binary_bfd_gc_sections bfd_generic_gc_sections +#define binary_bfd_lookup_section_flags bfd_generic_lookup_section_flags #define binary_bfd_merge_sections bfd_generic_merge_sections #define binary_bfd_is_group_section bfd_generic_is_group_section #define binary_bfd_discard_group bfd_generic_discard_group diff --git a/bfd/bout.c b/bfd/bout.c index b76191b..cfd4abb 100644 --- a/bfd/bout.c +++ b/bfd/bout.c @@ -1387,6 +1387,7 @@ b_out_bfd_get_relocated_section_contents (bfd *output_bfd, #define b_out_bfd_final_link _bfd_generic_final_link #define b_out_bfd_link_split_section _bfd_generic_link_split_section #define b_out_bfd_gc_sections bfd_generic_gc_sections +#define b_out_bfd_lookup_section_flags bfd_generic_lookup_section_flags #define b_out_bfd_merge_sections bfd_generic_merge_sections #define b_out_bfd_is_group_section bfd_generic_is_group_section #define b_out_bfd_discard_group bfd_generic_discard_group diff --git a/bfd/coff-alpha.c b/bfd/coff-alpha.c index c4dfd8f..2233a33 100644 --- a/bfd/coff-alpha.c +++ b/bfd/coff-alpha.c @@ -2393,6 +2393,9 @@ static const struct ecoff_backend_data alpha_ecoff_backend_data = #define _bfd_ecoff_get_section_contents_in_window \ _bfd_generic_get_section_contents_in_window +/* Input section flag lookup is generic. */ +#define _bfd_ecoff_bfd_lookup_section_flags bfd_generic_lookup_section_flags + /* Relaxing sections is generic. */ #define _bfd_ecoff_bfd_relax_section bfd_generic_relax_section #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections diff --git a/bfd/coff-mips.c b/bfd/coff-mips.c index cbc172f..9f8b90d 100644 --- a/bfd/coff-mips.c +++ b/bfd/coff-mips.c @@ -1410,6 +1410,9 @@ static const struct ecoff_backend_data mips_ecoff_backend_data = /* GC of sections is not done. */ #define _bfd_ecoff_bfd_gc_sections bfd_generic_gc_sections +/* Input section flags is not implemented. */ +#define _bfd_ecoff_bfd_lookup_section_flags bfd_generic_lookup_section_flags + /* Merging of sections is not done. */ #define _bfd_ecoff_bfd_merge_sections bfd_generic_merge_sections diff --git a/bfd/coff-rs6000.c b/bfd/coff-rs6000.c index c1b5c89..5d9b5ae 100644 --- a/bfd/coff-rs6000.c +++ b/bfd/coff-rs6000.c @@ -4102,6 +4102,7 @@ const bfd_target rs6000coff_vec = _bfd_xcoff_bfd_final_link, _bfd_generic_link_split_section, bfd_generic_gc_sections, + bfd_generic_lookup_section_flags, bfd_generic_merge_sections, bfd_generic_is_group_section, bfd_generic_discard_group, @@ -4356,6 +4357,7 @@ const bfd_target pmac_xcoff_vec = _bfd_xcoff_bfd_final_link, _bfd_generic_link_split_section, bfd_generic_gc_sections, + bfd_generic_lookup_section_flags, bfd_generic_merge_sections, bfd_generic_is_group_section, bfd_generic_discard_group, diff --git a/bfd/coff64-rs6000.c b/bfd/coff64-rs6000.c index ef4dfba..031385d 100644 --- a/bfd/coff64-rs6000.c +++ b/bfd/coff64-rs6000.c @@ -2738,6 +2738,7 @@ const bfd_target rs6000coff64_vec = _bfd_xcoff_bfd_final_link, _bfd_generic_link_split_section, bfd_generic_gc_sections, + bfd_generic_lookup_section_flags, bfd_generic_merge_sections, bfd_generic_is_group_section, bfd_generic_discard_group, @@ -2994,6 +2995,7 @@ const bfd_target aix5coff64_vec = _bfd_xcoff_bfd_final_link, _bfd_generic_link_split_section, bfd_generic_gc_sections, + bfd_generic_lookup_section_flags, bfd_generic_merge_sections, bfd_generic_is_group_section, bfd_generic_discard_group, diff --git a/bfd/coffcode.h b/bfd/coffcode.h index e71aadd..2313dc5 100644 --- a/bfd/coffcode.h +++ b/bfd/coffcode.h @@ -5652,6 +5652,10 @@ static bfd_coff_backend_data ticoff1_swap_table = #define coff_bfd_gc_sections bfd_generic_gc_sections #endif +#ifndef coff_bfd_lookup_section_flags +#define coff_bfd_lookup_section_flags bfd_generic_lookup_section_flags +#endif + #ifndef coff_bfd_merge_sections #define coff_bfd_merge_sections bfd_generic_merge_sections #endif diff --git a/bfd/cofflink.c b/bfd/cofflink.c index bca1364..27257ba 100644 --- a/bfd/cofflink.c +++ b/bfd/cofflink.c @@ -392,7 +392,11 @@ coff_link_add_symbols (bfd *abfd, section = coff_section_from_bfd_index (abfd, sym.n_scnum); if (! obj_pe (abfd)) value -= section->vma; - break; + /* Treat a symbol from a discarded section as undefined. */ + if (bfd_is_abs_section (section) + || !bfd_is_abs_section (section->output_section)) + break; + /* Fall thru */ case COFF_SYMBOL_UNDEFINED: flags = 0; diff --git a/bfd/ecoff.c b/bfd/ecoff.c index efcb9bf..b76266d 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -73,6 +73,8 @@ static asection bfd_debug_section = 0, NULL, 0, /* target_index, used_by_bfd, constructor_chain, owner, */ 0, NULL, NULL, NULL, + /* flag_info, */ + NULL, /* symbol, */ NULL, /* symbol_ptr_ptr, */ diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index 64a9dc0..08da2ae 100644 --- a/bfd/elf-bfd.h +++ b/bfd/elf-bfd.h @@ -1112,6 +1112,11 @@ struct elf_backend_data char *(*elf_backend_write_core_note) (bfd *abfd, char *buf, int *bufsiz, int note_type, ...); + /* This function, if defined, is called to convert target-specific + section flag names into hex values. */ + flagword (*elf_backend_lookup_section_flags_hook) + (char *); + /* This function returns class of a reloc type. */ enum elf_reloc_type_class (*elf_backend_reloc_type_class) (const Elf_Internal_Rela *); @@ -1793,7 +1798,7 @@ extern bfd_boolean _bfd_elf_match_sections_by_type extern bfd_boolean bfd_elf_is_group_section (bfd *, const struct bfd_section *); extern void _bfd_elf_section_already_linked - (bfd *, struct bfd_section *, struct bfd_link_info *); + (bfd *, struct already_linked *, struct bfd_link_info *); extern void bfd_elf_set_group_contents (bfd *, asection *, void *); extern asection *_bfd_elf_check_kept_section @@ -2193,6 +2198,9 @@ extern bfd_boolean _bfd_elf_is_function_type (unsigned int); extern int bfd_elf_get_default_section_type (flagword); +extern void bfd_elf_lookup_section_flags + (struct bfd_link_info *, struct flag_info *); + extern Elf_Internal_Phdr * _bfd_elf_find_segment_containing_section (bfd * abfd, asection * section); diff --git a/bfd/elf32-arm.c b/bfd/elf32-arm.c index 257f7a5..0ddd0cf 100644 --- a/bfd/elf32-arm.c +++ b/bfd/elf32-arm.c @@ -14101,17 +14101,6 @@ elf32_arm_reloc_type_class (const Elf_Internal_Rela *rela) } } -/* Set the right machine number for an Arm ELF file. */ - -static bfd_boolean -elf32_arm_section_flags (flagword *flags, const Elf_Internal_Shdr *hdr) -{ - if (hdr->sh_type == SHT_NOTE) - *flags |= SEC_LINK_ONCE | SEC_LINK_DUPLICATES_SAME_CONTENTS; - - return TRUE; -} - static void elf32_arm_final_write_processing (bfd *abfd, bfd_boolean linker ATTRIBUTE_UNUSED) { @@ -15337,7 +15326,6 @@ const struct elf_size_info elf32_arm_size_info = #define elf_backend_post_process_headers elf32_arm_post_process_headers #define elf_backend_reloc_type_class elf32_arm_reloc_type_class #define elf_backend_object_p elf32_arm_object_p -#define elf_backend_section_flags elf32_arm_section_flags #define elf_backend_fake_sections elf32_arm_fake_sections #define elf_backend_section_from_shdr elf32_arm_section_from_shdr #define elf_backend_final_write_processing elf32_arm_final_write_processing diff --git a/bfd/elflink.c b/bfd/elflink.c index b518da8..dc3840e 100644 --- a/bfd/elflink.c +++ b/bfd/elflink.c @@ -3900,7 +3900,7 @@ error_free_dyn: sec = bfd_section_from_elf_index (abfd, isym->st_shndx); if (sec == NULL) sec = bfd_abs_section_ptr; - else if (sec->kept_section) + else if (elf_discarded_section (sec)) { /* Symbols from discarded section are undefined. We keep its visibility. */ @@ -5525,7 +5525,8 @@ bfd_elf_size_dynamic_sections (bfd *output_bfd, { asection *s; - if (inputobj->flags & (DYNAMIC | EXEC_P | BFD_LINKER_CREATED)) + if (inputobj->flags + & (DYNAMIC | EXEC_P | BFD_PLUGIN | BFD_LINKER_CREATED)) continue; s = bfd_get_section_by_name (inputobj, ".note.GNU-stack"); if (s) @@ -12167,6 +12168,83 @@ bfd_elf_gc_record_vtentry (bfd *abfd ATTRIBUTE_UNUSED, return TRUE; } +/* Map an ELF section header flag to its corresponding string. */ +typedef struct +{ + char *flag_name; + flagword flag_value; +} elf_flags_to_name_table; + +static elf_flags_to_name_table elf_flags_to_names [] = +{ + { "SHF_WRITE", SHF_WRITE }, + { "SHF_ALLOC", SHF_ALLOC }, + { "SHF_EXECINSTR", SHF_EXECINSTR }, + { "SHF_MERGE", SHF_MERGE }, + { "SHF_STRINGS", SHF_STRINGS }, + { "SHF_INFO_LINK", SHF_INFO_LINK}, + { "SHF_LINK_ORDER", SHF_LINK_ORDER}, + { "SHF_OS_NONCONFORMING", SHF_OS_NONCONFORMING}, + { "SHF_GROUP", SHF_GROUP }, + { "SHF_TLS", SHF_TLS }, + { "SHF_MASKOS", SHF_MASKOS }, + { "SHF_EXCLUDE", SHF_EXCLUDE }, +}; + +void +bfd_elf_lookup_section_flags (struct bfd_link_info *info, hooks/post-receive -- Repository for Project Archer.