Commit Graph

91086 Commits

Author SHA1 Message Date
Alan Modra e5dcc5a2b5 Revert "Add enable-gold and enable-ld to src-release"
This reverts commit bd926929f0.
2017-09-14 18:38:44 +09:30
matt rice bd926929f0 Add enable-gold and enable-ld to src-release
So that the tarball picks up gold bison output.

	* src-release.sh (do_proto_toplev): Enable gold during release process.

(cherry picked from commit 255300f5a9)
2017-09-14 18:35:32 +09:30
Hans-Peter Nilsson 0f39cf99f5 PR ld/20125, MMIX weak symbols
Weak undefineds with PUSHJ relocs were "lost", causing internal
inconsistencies and an abort.

Import from mainline.
2017-09-14 05:03:14 +02:00
Hans-Peter Nilsson ab0462915c * dwarf.c (display_debug_names): Initialize hash_prev.
gcc-4.3.0 warns that it may be used uninitialized.  It takes a look
and a half at the code to understand that it's false.

Import from mainline.
2017-09-14 04:52:20 +02:00
GDB Administrator e5389bb3a5 Automatic date update in version.in 2017-09-14 00:01:33 +00:00
GDB Administrator 116eb00edd Automatic date update in version.in 2017-09-13 00:01:36 +00:00
GDB Administrator 37e991bb14 Automatic date update in version.in 2017-09-12 00:01:42 +00:00
GDB Administrator 42e1a3f371 Automatic date update in version.in 2017-09-11 00:01:48 +00:00
Nick Clifton 4c730770f0 Import fix from mainline that fixes buffer overrun errors when parsing corrupt DWARF debug information string sections.
PR 22047
	* dwarf2.c (read_section): If necessary add a terminating NUL byte
	to dwarf string sections.
2017-09-10 10:26:33 +01:00
Alan Modra 38d47c2247 PowerPC64 --plt-align
This changes the PowerPC64 --plt-align option to perform the usual
alignment of code as suggested by its name, as well as the previous
behaviour of padding so as to reduce boundary crossing.  The old
behaviour is had by using a negative parameter.

The default is also changed to align plt stub code by default to 32
byte boundaries, the point being to get better bctr branch prediction
on power8 and power9 hardware.

bfd/
	* elf64-ppp.c (plt_stub_pad): Handle positive and negative
	plt_stub_align.
ld/
	* ld.texinfo (--plt-align): Describe new behaviour of option.
	* emultempl/ppc64elf.em (params): Default plt_stub_align to 5.
	* testsuite/ld-powerpc/powerpc.exp: Pass --no-plt-align for
	selected tests.
	* testsuite/ld-powerpc/relbrlt.d: Pass --no-plt-align.
	* testsuite/ld-powerpc/elfv2so.d: Adjust expected output.

(cherry picked from commit 2420fff633)
(and commit bab55c05 for part of elfv2so.d change)
2017-09-10 18:22:20 +09:30
GDB Administrator 68b908bd58 Automatic date update in version.in 2017-09-10 00:01:32 +00:00
H.J. Lu 21ac709345 x86: Remove restriction on NOTRACK prefix position
Since the NOTRACK prefix is no longer required to be the last prefix
before the REX prefix, restriction on the NOTRACK prefix position is
removed from assembler as well as disassembler.  Assembler encodes the
NOTRACK prefix the same way as the DS segment register, which places
it before other prefixes.  Disassembler displays prefixes in the order
they appear.

gas/

	* config/tc-i386.c (NOTRACK_PREFIX): Removed.
	(REX_PREFIX): Updated.
	(MAX_PREFIXES): Likewise.
	(parse_insn): Remove restriction on NOTRACK prefix position.
	* testsuite/gas/i386/notrack.s: Add tests with NOTRACK prefix
	before other prefixes.
	* testsuite/gas/i386/x86-64-notrack.s: Likewise.
	* testsuite/gas/i386/notrackbad.s: Remove tests with NOTRACK
	prefix before other prefixes.
	* testsuite/gas/i386/x86-64-notrackbad.s: Likewise.
	* testsuite/gas/i386/notrack-intel.d: Updated.
	* testsuite/gas/i386/notrack.d: Likewise.
	* testsuite/gas/i386/notrackbad.l: Likewise.
	* testsuite/gas/i386/x86-64-notrack-intel.d: Likewise.
	* testsuite/gas/i386/x86-64-notrack.d: Likewise.
	* testsuite/gas/i386/x86-64-notrackbad.l: Likewise.

opcodes/

	* i386-dis.c (last_active_prefix): Removed.
	(ckprefix): Don't set last_active_prefix.
	(NOTRACK_Fixup): Don't check last_active_prefix.

(cherry picked from commit 4e9ac44a89)
2017-09-09 09:09:33 -07:00
H.J. Lu bb0216e266 x86: Check for valid PLT section size
Update x86 get_synthetic_symtab to check for valid PLT section size
before examining PLT section contents.

	PR binutils/22018
	* elf32-i386.c (elf_i386_get_synthetic_symtab): Check for valid
	PLT section size.
	* elf64-x86-64.c (elf_x86_64_get_synthetic_symtab): Likewise.

(cherry picked from commit 90efb64229)
2017-09-09 04:36:05 -07:00
GDB Administrator fe41779b56 Automatic date update in version.in 2017-09-09 00:01:49 +00:00
GDB Administrator 7a261482fc Automatic date update in version.in 2017-09-08 00:01:19 +00:00
GDB Administrator 0d8a80b957 Automatic date update in version.in 2017-09-07 00:01:38 +00:00
GDB Administrator 3920430d4a Automatic date update in version.in 2017-09-06 00:01:23 +00:00
Nick Clifton 64aa124657 Import patches from mainline to fix minor binutils bugs:
PR 21861
	* winduni.c (codepages): Use cp1252 for codepage 0.

	PR 21813
	* rddbg.c (read_symbol_stabs_debugging_info): Check for an empty
	string whilst concatenating symbol names.

	PR 21909
	* prdbg.c (pr_int_type): Increase size of local string buffer.
	(pr_float_type): Likewise.
	(pr_bool_type): Likewise.

	PR 21820
	* readelf.c (dump_section_as_strings): Do not fail if the section
	was empty.
	(dump_section_as_bytes): Likewise.

	PR 21990
	* readelf.c (process_version_sections <SHT_GNU_verneed>): Check
	for invalid vn_next field before adding to idx.  Use unsigned
	long for index vars.  Move index checks.
	<SHT_GNU_verdef>: Likewise for vd_next.

	PR 21994
	* readelf.c (process_version_sections <SHT_GNU_verdef>): Check
	vd_aux and vda_next for sanity.  Delete "end".  Correct overflow
	checks.
	(process_version_sections <SHT_GNU_verneed>): Correct overflow
	check.  Don't report invalid vna_next on overflow.  Do report
	invalid vna_next on size less than aux info.
2017-09-05 15:32:04 +01:00
Nick Clifton 5709459090 Import patch from mainline to fix memory leak.
PR binutils/22032
	* opncls.c (bfd_close_all_done): Don't call bfd_cache_close
	before _close_and_cleanup.  Call iovec->bclose after.
	(bfd_close): Remove code common to, and call, bfd_close_all_done.
2017-09-05 14:53:37 +01:00
Nick Clifton 81d80fc079 Import parch from mainline to prevent buffer overrun.
PR 21995
	* readelf.c (process_mips_specific): Add checks for a NULL data
	pointer.
2017-09-05 13:27:56 +01:00
GDB Administrator 39b3e0740e Automatic date update in version.in 2017-09-05 00:01:19 +00:00
Nick Clifton 35e01275b5 Import patch from mainline to improve padding of .eh_frame sections.
PR 21441
bfd	* elf-eh-frame.c (_bfd_elf_discard_section_eh_frame): Don't add
	alignment padding here.
	* elflink.c (bfd_elf_discard_info): Add .eh_frame padding here
	in a reverse pass over sections.

ld	* testsuite/ld-elf/eh3.d: Update.
	* testsuite/ld-elf/eh4.d: Update.
	PR 21441
	* testsuite/ld-x86-64/pr21038a.d: Adjust.
	* testsuite/ld-x86-64/pr21038a-now.d: Adjust.
2017-09-04 17:28:17 +01:00
Nick Clifton d6f8dea679 Import patch from mainline to fix address violation errors when parsing corrupt ELF binaries.
PR 21916
	* elf-attrs.c (_bfd_elf_parse_attributes): Complain about very
	small section lengths.
	* elf.c (_bfd_elf_setup_sections): Skip empty entries in the group
	table.
	(elfcore_grok_freebsd_prstatus): Add checks to make sure that
	there is enough data present in the note.
2017-09-04 17:05:17 +01:00
Nick Clifton 3a6dbb3b26 Import patch from mainline to allows 16-bit MSP430 absolute branches to be relaxed ino 1-bit PC-relative branches.
PR 21824
	* elf32-msp430.c (msp430_elf_relax_section): Allow conversion of
	16-bit absolute branches into 10-bit pc-relative branches on the
	MSP430 as well as the MSP430X.
2017-09-04 16:43:00 +01:00
Nick Clifton deeb3d27c2 Import patch from mainline to fix address violation errors when parsing corrupt VMS and MACHO binaries.
PR 21813
	* mach-o.c (bfd_mach_o_canonicalize_relocs): Pass the base address
	of the relocs to the canonicalize_one_reloc routine.
	* mach-o.h (struct bfd_mach_o_backend_data): Update the prototype
	for the _bfd_mach_o_canonicalize_one_reloc field.
	* mach-o-arm.c (bfd_mach_o_arm_canonicalize_one_reloc): Add
	res_base parameter.  Use to check for corrupt pair relocs.
	* mach-o-aarch64.c (bfd_mach_o_arm64_canonicalize_one_reloc):
	Likewise.
	* mach-o-i386.c (bfd_mach_o_i386_canonicalize_one_reloc):
	Likewise.
	* mach-o-x86-64.c (bfd_mach_o_x86_64_canonicalize_one_reloc):
	Likewise.
	* vms-alpha.c (_bfd_vms_slurp_eihd): Make sure that there is
	enough data in the record before attempting to parse it.
	(_bfd_vms_slurp_eeom): Likewise.
	(_bfd_vms_slurp_egsd): Check for an invalid section index.
	(image_set_ptr): Likewise.
	(alpha_vms_slurp_relocs): Likewise.
	(alpha_vms_object_p): Check for a truncated record.
2017-09-04 16:31:12 +01:00
Nick Clifton a541116faa Import patch from mainline to improve reporting of corrupt archives.
PR 21787
	* archive.c (bfd_generic_archive_p): If the bfd does not have the
	correct magic bytes at the start, set the error to wrong format
	and clear the format selector before returning NULL.
2017-09-04 16:14:19 +01:00
Nick Clifton 7e693dd5ce Import patch from mainline to fix address violations when parsing corrupt COFF binaries
PR 21786
	* coff-rs6000.c (_bfd_strntol): New function.
	(_bfd_strntoll): New function.
	(GET_VALUE_IN_FIELD): New macro.
	(EQ_VALUE_IN_FIELD): new macro.
	(_bfd_xcoff_slurp_armap): Use new macros.
	(_bfd_xcoff_archive_p): Likewise.
	(_bfd_xcoff_read_ar_hdr): Likewise.
	(_bfd_xcoff_openr_next_archived_file): Likewise.
	(_bfd_xcoff_stat_arch_elt): Likewise.
	* coff64-rs6000.c (_bfd_strntol): New function.
	(_bfd_strntoll): New function.
	(GET_VALUE_IN_FIELD): New macro.
	(xcoff64_slurp_armap): Use new macros.
2017-09-04 16:04:44 +01:00
Nick Clifton 353c8680bc Import patch from mainline to replace an abort when parsing a corrupt COFF binary with an error message instead.
PR binutils/21781
	* coffcode.h (handle_COMDAT): Replace abort with an error message
	and return.
2017-09-04 15:51:32 +01:00
GDB Administrator 75d67a6c5b Automatic date update in version.in 2017-09-04 00:01:28 +00:00
Alan Modra 4b2b2eec57 PR22067, x86 check_relocs invalid read
PR 22067
	* elf32-i386.c (elf_i386_hash_table): Check is_elf_hash_table first.
	* elf64-x86-64.c (elf_x86_64_hash_table): Likewise.
2017-09-04 08:37:57 +09:30
GDB Administrator 89b69822ec Automatic date update in version.in 2017-09-03 00:01:37 +00:00
H.J. Lu 78a6a9c3a3 x86-64: Check ELF_COMMON_DEF_P for common symbols
bfd/

	PR ld/22064
	* elf64-x86-64.c (elf_x86_64_finish_dynamic_symbol): Check
	ELF_COMMON_DEF_P for common symbols.

ld/

	PR ld/22064
	* testsuite/ld-x86-64/pr22064a.S: New file.
	* testsuite/ld-x86-64/pr22064b.c: Likewise.
	* testsuite/ld-x86-64/x86-64.exp: Run PR ld/22064 test.

(cherry picked from commit ad71ce8de7)
2017-09-01 19:54:15 -07:00
GDB Administrator e86c260393 Automatic date update in version.in 2017-09-02 00:01:34 +00:00
H.J. Lu e6d76f0cef x86: Correct unwind information for the second PLT
For i386, generate unwind information for the second PLT.  For x32,
correct alignment of .eh_frame section for the second PLT.

bfd/

	PR ld/22061
	* elf32-i386.c (elf_i386_link_setup_gnu_properties): Create
	.eh_frame section for the second PLT.
	* elf64-x86-64.c (elf_x86_64_link_setup_gnu_properties): Correct
	alignment of .eh_frame section for the second PLT.

ld/

	PR ld/22061
	* testsuite/ld-i386/ibt-plt-1.d: Pass --hash-style=sysv to ld.
	Updated.
	* testsuite/ld-i386/ibt-plt-2a.d: Likewise.
	* testsuite/ld-i386/ibt-plt-2c.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3a.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3c.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-1-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2a-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2c-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3a-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3c-x32.d: Likewise.
	* testsuite/ld-i386/ibt-plt-2b.d: Pass --hash-style=sysv to ld
	and dump unwind information.
	* testsuite/ld-i386/ibt-plt-2d.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3b.d: Likewise.
	* testsuite/ld-i386/ibt-plt-3d.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2b-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2b.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2d-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2d.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3b-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3b.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3d-x32.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3d.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-1.d: Pass --hash-style=sysv to ld.
	* testsuite/ld-x86-64/ibt-plt-2a.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-2c.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3a.d: Likewise.
	* testsuite/ld-x86-64/ibt-plt-3c.d: Likewise.

(cherry picked from commit e10c9c620c)
2017-09-01 08:31:24 -07:00
Nick Clifton 6bdd626984 Prevent an address violation parsing corrupt DWARF information by fixing the test for an overlong debug line info structure.
PR 22059
        * dwarf2.c (decode_line_info): Fix test for an overlong line info
        structure.
2017-09-01 11:22:43 +01:00
Nick Clifton d4ea9548f3 Import latest bug fixes for the libiberty sources from GCC mainline.
PR lto/81968
	* simple-object-elf.c (simple_object_elf_copy_lto_debug_section):
	Keep names of removed global symbols.

	* simple-object-xcoff.c (simple_object_xcoff_find_sections):
	Improve .go_export csect handling.  Don't make assumptions
	on containing section or number of auxiliary entries.

	PR lto/81968
	* simple-object-elf.c (simple_object_elf_copy_lto_debug_section):
	Adjust field with for sh_type write, set SHF_EXCLUDE only for
	removed sections.

	PR lto/81925
	* simple-object-elf.c (simple_object_elf_write_shdr): Adjust
	type of sh_addralign and sh_entsize and properly write
	sh_entsize as Elf_Addr.
	(simple_object_elf_write_to_file): Read sh_entsize as Elf_Addr.

	* simple-object-common.h (struct simple_object_functions): Add
	copy_lto_debug_sections hook.
	* simple-object.c: Include fcntl.h.
	(handle_lto_debug_sections): New helper function.
	(simple_object_copy_lto_debug_sections): New function copying
	early LTO debug sections to regular debug sections in a new file.
	(simple_object_start_write): Handle NULL segment_name.
	* simple-object-coff.c (simple_object_coff_functions): Adjust
	for not implemented copy_lto_debug_sections hook.
	* simple-object-mach-o.c (simple_object_mach_o_functions): Likewise.
	* simple-object-xcoff.c (simple_object_xcoff_functions): Likewise.
	* simple-object-elf.c (SHT_NULL, SHT_SYMTAB, SHT_RELA, SHT_REL,
	SHT_GROUP): Add various sectopn header types.
	(SHF_EXCLUDE): Add flag.
	(Elf32_External_Sym, Elf64_External_Sym): Add symbol struct.
	(ELF_ST_BIND, ELF_ST_TYPE, ELF_ST_INFO): Add accessors.
	(STT_OBJECT, STT_FUNC, STT_TLS, STT_GNU_IFUNC): Add Symbol types.
	(STV_DEFAULT): Add symbol visibility.
	(SHN_COMMON): Add special section index name.
	(struct simple_object_elf_write): New.
	(simple_object_elf_start_write): Adjust for new private data.
	(simple_object_elf_write_shdr): Pass in values for all fields
	we write.
	(simple_object_elf_write_to_file): Adjust.  Copy from recorded
	section headers if requested.
	(simple_object_elf_release_write): Release private data.
	(simple_object_elf_copy_lto_debug_sections): Copy and rename sections
	as denoted by PFN and all their dependences, symbols and relocations
	to the empty destination file.
	(simple_object_elf_functions): Adjust for copy_lto_debug_sections hook.

	* simple-object-xcoff.c (simple_object_xcoff_find_sections):
	Search symbol table for .go_export symbol and apply pfn if found.
2017-09-01 10:56:58 +01:00
Nick Clifton 30326b094b Check for an invalid note size when parsing ELF notes.
PR 21933
	PR 22060
	* elf.c (elf_read_notes): Check for a note size of -1.
2017-09-01 10:17:00 +01:00
Nick Clifton aceaeff814 Fix buffer overrun when parsing an ELF attribute string that is not NUL terminated.
PR 22058
	* elf-attrs.c (_bfd_elf_parse_attributes): Ensure that the
	attribute buffer is NUL terminated.
2017-09-01 09:59:17 +01:00
GDB Administrator 8950116852 Automatic date update in version.in 2017-09-01 00:01:27 +00:00
Nick Clifton c1c56a24a9 Add updated French translations for opcodes and gprof 2017-08-31 14:32:26 +01:00
GDB Administrator fdc97a2f95 Automatic date update in version.in 2017-08-31 00:01:19 +00:00
Maciej W. Rozycki 31939e5b2a MIPS/BFD: Correct microMIPS cross-mode BAL to JALX relaxation
Fix a bug in commit a6ebf6169a ("MIPS: Convert cross-mode BAL to
JALX") and in BFD linker relaxation correct the microMIPS interpretation
of the branch offset, which is supposed to be shifted by 1 bit, rather
than 2 as in the regular MIPS case.

	bfd/
	* elfxx-mips.c (mips_elf_perform_relocation): Correct microMIPS
	branch offset interpretation.

	gas/
	* testsuite/gas/mips/branch-addend-micromips.d: New test.
	* testsuite/gas/mips/branch-addend-micromips-n32.d: New test.
	* testsuite/gas/mips/branch-addend-micromips-n64.d: New test.
	* testsuite/gas/mips/branch-addend-micromips.s: New test source.
	* testsuite/gas/mips/mips.exp: Run the new tests.

	ld/
	* testsuite/ld-mips-elf/bal-jalx-addend-micromips.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n32.d: New
	test.
	* testsuite/ld-mips-elf/bal-jalx-addend-micromips-n64.d: New
	test.
	* testsuite/ld-mips-elf/bal-jalx-local-micromips.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-local-micromips-n32.d: New
	test.
	* testsuite/ld-mips-elf/bal-jalx-local-micromips-n64.d: New
	test.
	* testsuite/ld-mips-elf/bal-jalx-pic-micromips.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n32.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-pic-micromips-n64.d: New test.
	* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips.d: New
	test.
	* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n32.d: New
	test.
	* testsuite/ld-mips-elf/bal-jalx-pic-ignore-micromips-n64.d: New
	test.
	* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.

(cherry picked from commit 70e65ca8e5)
2017-08-30 16:14:33 +01:00
Maciej W. Rozycki 012daee471 MIPS/GAS: Also respect `-mignore-branch-isa' with MIPS16 code
Fix a bug in commit 8b10b0b3e1 ("MIPS: Add options to control branch
ISA checks") and with the `-mignore-branch-isa' command-line option also
lift a GAS check for invalid MIPS16 branches between ISA modes, which is
made separately from regular MIPS and microMIPS checks.

	gas/
	* config/tc-mips.c (md_convert_frag): Respect
	`mips_ignore_branch_isa'.
	* testsuite/gas/mips/branch-local-5.d: New test.
	* testsuite/gas/mips/branch-local-n32-5.d: New test.
	* testsuite/gas/mips/branch-local-n64-5.d: New test.
	* testsuite/gas/mips/branch-local-6.d: New test.
	* testsuite/gas/mips/branch-local-n32-6.d: New test.
	* testsuite/gas/mips/branch-local-n64-6.d: New test.
	* testsuite/gas/mips/branch-local-7.d: New test.
	* testsuite/gas/mips/branch-local-n32-7.d: New test.
	* testsuite/gas/mips/branch-local-n64-7.d: New test.
	* testsuite/gas/mips/branch-local-ignore-5.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n32-5.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n64-5.d: New test.
	* testsuite/gas/mips/branch-local-ignore-6.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n32-6.d: New test.
	* testsuite/gas/mips/branch-local-ignore-n64-6.d: New test.
	* testsuite/gas/mips/branch-local-5.l: New stderr output.
	* testsuite/gas/mips/branch-local-6.l: New stderr output.
	* testsuite/gas/mips/branch-local-5.s: New test source.
	* testsuite/gas/mips/branch-local-6.s: New test source.
	* testsuite/gas/mips/branch-local-7.s: New test source.
	* testsuite/gas/mips/mips.exp: Run the new tests.

(cherry picked from commit 37b2d32751)
2017-08-30 16:11:55 +01:00
GDB Administrator 5d251566b9 Automatic date update in version.in 2017-08-30 00:01:29 +00:00
Han Shen ee5d69b8af Import from mainline to fix PR gold/21868.
2017-08-28  James Clarke <jrtc27@jrtc27.com>

gold/ChangeLog:
	PR gold/21868
	* aarch64.cc (AArch64_relobj::try_fix_erratum_843419_optimized):
	Add extra view offset argument to function.
	(AArch64_relobj::fix_errata_and_relocate_erratum_stubs): Add
	extra view offset set to the output offset when the view has
	is_input_output_view set, since it has not already been
	included. Pass this to try_fix_erratum_843419_optimized.
2017-08-29 14:47:41 -07:00
Nick Clifton 796337aa8b Import patch from mainline to fix address violation issues when parsing corrupt binaries.
* mach-o.c (bfd_mach_o_read_symtab_strtab): Fail if the symtab
	size is -1.
	* nlmcode.h (nlm_swap_auxiliary_headers_in): Replace assertion
	with error return.
	* section.c (bfd_make_section_with_flags): Fail if the name or bfd
	are NULL.
	* vms-alpha.c (bfd_make_section_with_flags): Correct computation
	of end pointer.
	(evax_bfd_print_emh): Check for invalid string lengths.
2017-08-29 12:37:45 +01:00
GDB Administrator d7461746c1 Automatic date update in version.in 2017-08-29 00:02:29 +00:00
Alan Modra 188f4b1970 [GOLD] Symbol flag for PowerPC64 localentry:0 tracking
This patch provides a flag for PowerPC64 ELFv2 use in class Symbol,
and modifies Sized_target::resolve to return whether the symbol has
been resolved.  If not, normal processing continues.  I use this for
PowerPC64 ELFv2 to keep track of whether a symbol has any definition
with non-zero localentry, in order to disable --plt-localentry for
that symbol.

	PR 21847
	* powerpc.cc (Target_powerpc::is_elfv2_localentry0): Test
	non_zero_localentry.
	(Target_powerpc::resolve): New function.
	(powerpc_info): Set has_resolve for 64-bit.
	* target.h (Sized_target::resolve): Return bool.
	* resolve.cc (Symbol_table::resolve): Continue with normal
	processing when target resolve returns false.
	* symtab.h (Symbol::non_zero_localentry, set_non_zero_localentry):
	New accessors.
	(Symbol::non_zero_localentry_): New flag bit.
	* symtab.cc (Symbol::init_fields): Init non_zero_localentry_.
2017-08-28 16:52:03 +09:30
GDB Administrator 672310691b Automatic date update in version.in 2017-08-28 00:02:24 +00:00
GDB Administrator cdccfe36c4 Automatic date update in version.in 2017-08-27 00:02:32 +00:00