Commit Graph

14917 Commits

Author SHA1 Message Date
GDB Administrator
0a744d8f9d Automatic date update in version.in 2018-11-26 00:00:37 +00:00
GDB Administrator
bb31d44bb1 Automatic date update in version.in 2018-11-25 00:01:25 +00:00
GDB Administrator
f5e0fe29ee Automatic date update in version.in 2018-11-24 00:00:24 +00:00
GDB Administrator
8e4b639201 Automatic date update in version.in 2018-11-23 00:00:49 +00:00
GDB Administrator
79a9468c70 Automatic date update in version.in 2018-11-22 00:00:17 +00:00
Jozef Lawrynowicz
ca94519e70 Fix linking MSP430 files created by gcc's LTO optimizer.
When invoking GCC with "-g -flto", the compiler will create LTO objects
with debug information. The objects created are "simple ELF" objects (see
libiberty/simple-object-elf.c) and do not have target-specific sections.

When the MSP430 linker sees one of these objects without a .MSP430.attributes
section it errors:

> error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses MSP430X instructions but /tmp/ccynqIwudebugobj uses unknown
> error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses the small code model whereas /tmp/ccynqIwudebugobj uses the unknown code model
> error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses the small data model whereas /tmp/ccynqIwudebugobj uses the unknown data model
> error: /tmp/cc4LhbEI.ltrans0.ltrans.o uses the small code model but /tmp/ccynqIwudebugobj uses the unknown data model
> failed to merge target specific data of file /tmp/cc4LhbEI.ltrans0.ltrans.o

The following patch allows these debug LTO objects to be linked with other
MSP430 objects even if they do not have a .MSP430.attributes section.

bfd	* elf32-msp430.c (elf32_msp430_merge_mspabi_attributes): Do not
	error when .MSP430.attributes section is missing from objects
	created by LTO.
2018-11-21 16:21:25 +00:00
GDB Administrator
1b288e9bbf Automatic date update in version.in 2018-11-21 00:00:26 +00:00
GDB Administrator
85a2ae1134 Automatic date update in version.in 2018-11-20 00:00:36 +00:00
GDB Administrator
4f323b7277 Automatic date update in version.in 2018-11-19 00:00:29 +00:00
GDB Administrator
ad6d89178d Automatic date update in version.in 2018-11-18 00:01:35 +00:00
GDB Administrator
b1406c0b98 Automatic date update in version.in 2018-11-17 00:00:40 +00:00
GDB Administrator
2a2c6f530d Automatic date update in version.in 2018-11-16 00:01:06 +00:00
GDB Administrator
a0cd42fcd1 Automatic date update in version.in 2018-11-15 00:00:41 +00:00
GDB Administrator
dd9168931f Automatic date update in version.in 2018-11-14 00:01:05 +00:00
Jim Wilson
0242af4010 RISC-V: Improve linker error for FP mismatch.
bfd/
	* elfnn-riscv.c (riscv_float_abi_string): New.
	(_bfd_riscv_elf_merge_private_bfd_data): Use it for error message.
2018-11-13 15:56:29 -08:00
GDB Administrator
7322dd1f69 Automatic date update in version.in 2018-11-13 00:00:40 +00:00
GDB Administrator
417e50dbcf Automatic date update in version.in 2018-11-12 00:00:26 +00:00
GDB Administrator
0c57b50523 Automatic date update in version.in 2018-11-11 00:01:25 +00:00
GDB Administrator
00a9f4ce3d Automatic date update in version.in 2018-11-10 00:00:36 +00:00
Bernhard M. Wiedemann
dfbfec241a Correct comment concerning PE timestamp insertion.
* peXXigen.c (_bfd_XXi_only_swap_filehdr_out): Correct comment
	concerning timestamp insertion.
2018-11-09 16:06:48 +00:00
Cupertino Miranda
20b233dc48 Fixed warning from previous patch. Added Changelog. 2018-11-09 15:53:30 +00:00
Cupertino Miranda
d07b621f4c [ARC] More fixes for TLS.
Added warning for static TLS reloc.

Fixed issue related to TLS and partial static linking of libraries:
  This issue was detected when throwing exceptions in C++ while linking with
  -static-libstdc++.
  TLS relocation from the libstdc++ wasn't being patched as local now that it was
  static linked with the executable.

Fix for TLS with static and pie. Problem introduced by earlier patch:
  Fixes the following glibc tests:
   - elf/tst-tls1-static

bfd/
    xxxx-xx-xx  Cupertino Miranda  <cmiranda@synopsys.com>

	    * arc-got.h (arc_got_entry_type_for_reloc): Changed to
	      correct static TLS relocs.
            * elf32-arc.c (elf_arc_check_relocs): Introduced warning to
	      TLS relocs which require -fPIC.
	      (arc_create_forced_local_got_entries_for_tls): Created.
	      Traverses list of GOT entries to be resolved statically
	      when needed.
	      (elf_arc_finish_dynamic_sections): Changed. Calls
	      arc_create_forced_local_got_entries_for_tls for each known
	      possibly GOT symbol.
2018-11-09 15:34:37 +00:00
rhn
d2eb0fb5a0 Stop corruption of ihex output shen addresses are sign extended.
PR 23699
	* ihex.c (ihex_write_object_contents): Check for sign extended
	addresses that cannot be supported in the ihex format.
2018-11-09 14:09:44 +00:00
Claudiu Zissulescu
0f2064107b [ARC] Fix local got entry list.
Fix a memory leak appearing when the local got entry list was constructed.

bfd/
xxxx-xx-xx  Claudiu Zissulescu  <claziss@synopsys.com>

	* arc-got.h (arc_get_local_got_ents): Revamp it; use
	elf_local_got_ents to store the local got list.
	(get_got_entry_list_for_symbo): Restructure it.
	* elf32-arc.c (elf_arc_relocate_section): Correct the call to
	get_got_entry_list_for_symbol.
2018-11-09 13:20:27 +02:00
GDB Administrator
663cc8c0fc Automatic date update in version.in 2018-11-09 00:00:25 +00:00
GDB Administrator
9e49efb79c Automatic date update in version.in 2018-11-08 00:00:32 +00:00
Nick Clifton
0661ae2e53 Add updated French and Portuguese translations.
gas	* po/fr.po: Updated French translation.
bfd	* po/fr.po: Updated French translation.
	* po/pt.po: Updated Portuguese translation.
binutils* po/pt.po: Updated Portuguese translation.
2018-11-07 16:09:27 +00:00
Roman Bolshakov
fc7b364aba Add support for new load commands added by Apple to the MACH-O file format.
bfd	* mach-o.h: Add new enums for BFD_MACH_O_PLATFORM_MACOS,
	BFD_MACH_O_PLATFORM_IOS, BFD_MACH_O_PLATFORM_TVOS,
	BFD_MACH_O_PLATFORM_WATCHOS, BFD_MACH_O_PLATFORM_BRIDGEOS,
	BFD_MACH_O_TOOL_CLANG, BFD_MACH_O_TOOL_SWIFT, BFD_MACH_O_TOOL_LD.
	(struct bfd_mach_o_note_command): New.
	(struct bfd_mach_o_build_version_tool): New.
	(struct bfd_mach_o_build_version_command): New.
	(bfd_mach_o_read_version_min): Don't split version into
	a few fields. Rename reserved to sdk.
	* mach-o.c (bfd_mach_o_read_version_min): Don't split version into a
	few fields. Rename reserved to sdk.
	(bfd_mach_o_read_command): Handle LC_VERSION_MIN_TVOS, LC_NOTE,
	LC_BUILD_VERSION.
	(bfd_mach_o_read_note): New.
	(bfd_mach_o_read_build_version): New.

	PR 23728
binutils* od-macho.c (printf_version): New.
	(dump_load_command): Use it to print version. Print sdk version. Print
	version info for watchOS and tvOS. Print LC_NOTE, LC_BUILD_VERSION.
	(dump_buld_version): New.
	(bfd_mach_o_platform_name): New
	(bfd_mach_o_tool_name): New

	* mach-o/external.h (mach_o_nversion_min_command_external): Rename
	reserved to sdk.
	(mach_o_note_command_external): New.
	(mach_o_build_version_command_external): New.
	* mach-o/loader.h (BFD_MACH_O_LC_VERSION_MIN_TVOS): Define.
	(BFD_MACH_O_LC_NOTE): Define.
2018-11-07 15:20:22 +00:00
Alan Modra
42d4c301c4 Regen bfd/configure
* configure: Regenerate.
2018-11-07 21:55:06 +10:30
Yoshinori Sato
8d3c78e473 rx: Add target rx-*-linux. 2018-11-07 17:18:05 +09:00
GDB Administrator
8f531a8d1f Automatic date update in version.in 2018-11-07 00:00:16 +00:00
Nick Clifton
ddea148b3d Add support for a couple of new Mach-O commands.
PR 23742
	* mach-o.c (bfd_mach_o_read_command): Accept and ignore
	BFD_MACH_O_LC_LINKER_OPTIONS and BFD_MACH_O_LC_BUILD_VERSION
	commands.

	* mach-o/loader.h: Add BFD_MACH_O_LC_BUILD_VERSION.
2018-11-06 17:17:43 +00:00
GDB Administrator
50cab6efce Automatic date update in version.in 2018-11-06 00:00:35 +00:00
GDB Administrator
713f1b445a Automatic date update in version.in 2018-11-05 00:00:53 +00:00
GDB Administrator
9446bd8ad6 Automatic date update in version.in 2018-11-04 00:01:27 +00:00
GDB Administrator
a1fb41caab Automatic date update in version.in 2018-11-03 00:01:18 +00:00
Alan Modra
a4bcd73371 PR23850, strip should not discard/move .rela.plt in executable
strip/objcopy can't deal with alloc reloc sections, not .rela.dyn or
.rela.plt in a dynamic executable, or .rela.plt/.rela.iplt in a static
executable.  So, don't have BFD treat them as side-channel data
associated with the section they are relocating.

	PR 23850
	* elf.c (bfd_section_from_shdr): Treat SHF_ALLOC SHT_REL* sections
	in an executable or shared library as normal sections.
2018-11-02 13:48:08 +10:30
GDB Administrator
c175004a53 Automatic date update in version.in 2018-11-02 00:00:34 +00:00
GDB Administrator
38642de318 Automatic date update in version.in 2018-11-01 00:00:29 +00:00
Renlin Li
f32a4a5939 Don't create got section while processing TLS Local Exec relocations.
For Local Exec TLS model, the offset of the variable from the thread pointer
can be computed at static link time. This doesn't require GOT indirection.

The initial change is a bad fix for a problem during TLS GD -> LE relaxation.
The proper fix is to check whether _GLOBAL_OFFSET_TABLE_ is referenced,
create got section if yes.  And the fix is already in the repository.

bfd/

2018-10-31  Renlin Li  <renlin.li@arm.com>

    * elfnn-aarch64.c (elfNN_aarch64_check_relocs): Don't create got
    section for Local Exec TLS model.
2018-10-31 15:09:36 +00:00
GDB Administrator
b4e0939956 Automatic date update in version.in 2018-10-31 00:00:40 +00:00
GDB Administrator
9c3adfb9a4 Automatic date update in version.in 2018-10-30 00:00:40 +00:00
GDB Administrator
cad26cec07 Automatic date update in version.in 2018-10-29 00:00:35 +00:00
GDB Administrator
9da2bd6ac9 Automatic date update in version.in 2018-10-28 00:00:46 +00:00
GDB Administrator
6951e9f3e2 Automatic date update in version.in 2018-10-27 00:01:21 +00:00
GDB Administrator
e8138a6b78 Automatic date update in version.in 2018-10-26 00:00:32 +00:00
H.J. Lu
0a640d7196 ELF: Hide symbols defined in discarded input sections
When assigning symbol version, we should hide debug symbols defined in
discarded sections from IR objects so that they can be removed later.

bfd/

	PR ld/23818
	* elflink.c (_bfd_elf_link_assign_sym_version): Hide symbols
	defined in discarded input sections.

ld/

	PR ld/23818
	* testsuite/ld-plugin/lto.exp: Run PR ld/23818 test.
	* testsuite/ld-plugin/pr23818.d: New file.
	* testsuite/ld-plugin/pr23818.t: Likewise.
	* testsuite/ld-plugin/pr23818a.c: Likewise.
	* testsuite/ld-plugin/pr23818b.c: Likewise.
2018-10-24 18:08:24 -07:00
GDB Administrator
0e139b8787 Automatic date update in version.in 2018-10-25 00:00:43 +00:00
Alan Modra
8c246a60c0 cmse_scan segfault
elf_sym_hashes for as-needed libs will be zeroed if the library is
found to be not needed.  More than that, the local symbols for such a
library should not be considered by cmse_scan.

	* elf32-arm.c (elf32_arm_size_stubs): Ignore as-needed libs that
	were not needed.
2018-10-24 23:38:52 +10:30
GDB Administrator
20784627bf Automatic date update in version.in 2018-10-24 00:00:40 +00:00