• R/O
  • HTTP
  • SSH
  • HTTPS

List of commits

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

GNU Binutils with patches for OS216


binutils-2_31-branch
RSS
Rev. Tiempo Autor
d120ec3 binutils-2_31-branch 2020-03-11 14:39:38 Alan Modra

powerpc64-ld infinite loop

If this code dealing with possible conversion of inline plt sequences
is ever executed, ld will hang. A binary with such sequences and of
code size larger than approximately 90% the reach of an unconditional
branch is the trigger. Oops.

* elf64-ppc.c (ppc64_elf_inline_plt): Do increment rel in for loop.

(cherry picked from commit 435edf0bf231240ccecb474b74ebb49dc8db2633)

34a30b6 2019-09-06 01:37:38 Eric Botcazou

Fix PR ld/24574

This restores a line that has been dropped when the auto-import feature
of the PE-COFF linker was overhauled about one year. It is necessary
for GDB to properly resolve extern symbol in DLLs.

ld/ChangeLog
* pe-dll.c (pe_find_data_imports): Replace again the original name
of the undefined symbol with the __imp_ prefixed one after it is
resolved.

8a1285a 2019-05-17 23:38:14 Alan Modra

PR24567, assertion failure in ldlang.c:6868 when compiling with -flto

As the existing comment said: "a common ought to be overridden by a
def in a -flto object". This patch makes the code actually do that,
rather than allowing a normal object file common to override a -flto
defined symbol.

PR 24567
* plugin.c (plugin_notice): Do not let a common symbol override
a non-common definition in IR.

(cherry picked from commit af4fa23fba220c1b26bb3c8a7996b406dcc181cc)

bca6a14 2019-04-25 02:37:28 H.J. Lu

x86: Also check x86 linker_def for non-shared definition

Since elf_x86_linker_defined sets linker_def in elf_x86_link_hash_entry
for linker defined symbols, SYMBOL_DEFINED_NON_SHARED_P should also check
linker_def in elf_x86_link_hash_entry.

bfd/

PR ld/24458
* elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): Also check x86
linker_def.

ld/

PR ld/24458
* testsuite/ld-x86-64/x86-64.exp: Run PR ld/24458 tests.
* testsuite/ld-x86-64/pr24458.s: New file.
* testsuite/ld-x86-64/pr24458a-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458a.d: Likewise.
* testsuite/ld-x86-64/pr24458b-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458b.d: Likewise.
* testsuite/ld-x86-64/pr24458c-x32.d: Likewise.
* testsuite/ld-x86-64/pr24458c.d: Likewise.

(cherry picked from commit 4e84a8f8bbeab52fa7048873655e582ceb92534d)

dba1783 2019-03-18 21:23:07 Alan Modra

PR24355, segmentation fault in function called from ppc_finish_symbols

This one looks to be a bug going back to 2009, git commit e054468f6c
"STT_GNU_IFUNC support for PowerPC". That bug was carried over with
git commit 49c09209d0 "Rearrange PLT reloc output on powerpc".

If the refcount for an ifunc local sym plt entry was zero,
ppc_elf_size_dynamic_sections would correctly set plt.offset to -1 but
leave glink_offset uninitialized. That leads to occasional segfaults
(which can be made solid with MALLOC_PERTURB_=1 when using glibc).
So, guard the write_glink_stub call with plt.offset != -1. Also,
remove the totally ineffective attempt at writing multiple-use glink
stubs only once.

PR 24355
* elf32-ppc.c (ppc_finish_symbols): Don't call write_glink_stub
for local iplt syms with ent->plt.offset == -1. Remove ineffective
attempt at writing glink stubs only once.

(cherry picked from commit 8cd1fe1bf525b59f4d07e5790d11d49eee7e8494)

88739f7 2019-02-19 00:08:57 Nick Clifton

Import patch to fix PR23919 from the mainline.

PR binutils/23919
bfd * bfd.c (bfd_update_compression_header): Explicitly set alignment.
(bfd_check_compression_header): Add uncompressed_alignment_power
argument. Check ch_addralign is a power of 2.
* bfd-in2.h: Regenerated.
* compress.c (bfd_compress_section_contents): Get and set
orig_uncompressed_alignment_pow if section is decompressed.
(bfd_is_section_compressed_with_header): Add and get
uncompressed_align_pow_p argument.
(bfd_is_section_compressed): Add uncompressed_align_power argument
to bfd_is_section_compressed_with_header call.
(bfd_init_section_decompress_status): Get and set
uncompressed_alignment_power.
* elf.c (_bfd_elf_make_section_from_shdr): Add
uncompressed_align_power argument to
bfd_is_section_compressed_with_header call.

* compress.c (bfd_is_section_compressed_with_header): Initialize
* uncompressed_align_pow_p to 0.

binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
(dump_sections_as_bytes): Likewise.
(load_specific_debug_sections): Likewise.
* testsuite/binutils-all/dw2-3.rS: Adjust alignment.
* testsuite/binutils-all/dw2-3.rt: Likewise.

gold * merge.cc (Output_merge_string<Char_type>::do_add_input_section):
Get addralign from decompressed_section_contents.
* object.cc (build_compressed_section_map): Set info.addralign.
(Object::decompressed_section_contents): Add a palign
argument and store p->second.addralign in *palign if it isn't
NULL.
* object.h (Compressed_section_info): Add addralign.
(section_is_compressed): Add a palign argument, default it
to NULL, store p->second.addralign in *palign if it isn't NULL.
(Object::decompressed_section_contents): Likewise.
* output.cc (Output_section::add_input_section): Get addralign
from section_is_compressed.

292144d 2019-02-10 22:57:53 H.J. Lu

gas: Pass max_bytes to TC_FRAG_INIT

ommit 3ae729d5a4f63740ed9a778960b17c2912b0bbdd
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Wed Mar 7 04:18:45 2018 -0800

x86: Rewrite NOP generation for fill and alignment

increased MAX_MEM_FOR_RS_ALIGN_CODE to 4095 which resulted in increase
of assembler time and memory usage by 5 times for inputs with many
.p2align directives, which is typical for LTO output. This patch passes
max_bytes to TC_FRAG_INIT so that MAX_MEM_FOR_RS_ALIGN_CODE can be set
as needed and tracked by backend it so that HANDLE_ALIGN can check the
maximum alignment for each rs_align_code frag. Wall time to assemble
the same cc1plus.s:

before:

423.78user 0.89system 7:05.71elapsed 99%CPU

after:

102.35user 0.27system 1:42.89elapsed 99%CPU

PR gas/24165
* config/tc-i386.h (MAX_MEM_FOR_RS_ALIGN_CODE): Set to
(alignment ? ((1 << alignment) - 1) : 1)
(i386_tc_frag_data): Add max_bytes.
(TC_FRAG_INIT): Track max_chars in max_bytes.
(HANDLE_ALIGN): Replace MAX_MEM_FOR_RS_ALIGN_CODE with
fragP->tc_frag_data.max_bytes.

(cherry picked from commit db22231044df03bbcb987496f3f29f0462b2e9ee)

c83ac80 2019-02-10 22:51:45 H.J. Lu

x86-64: Restore PIC check for PCREL reloc against protected symbol

commit bd7ab16b4537788ad53521c45469a1bdae84ad4a
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Tue Feb 13 07:34:22 2018 -0800

x86-64: Generate branch with PLT32 relocation

removed check R_X86_64_PC32 relocation against protected symbols in
shared objects. Since elf_x86_64_check_relocs is called after we
have seen all input files, we can check for PC-relative relocations in
elf_x86_64_check_relocs. We should not allow PC-relative relocations
against protected symbols since address of protected function and
location of protected data may not be in the shared object.

bfd/

PR ld/24151
* elf64-x86-64.c (elf_x86_64_need_pic): Check
SYMBOL_DEFINED_NON_SHARED_P instead of def_regular.
(elf_x86_64_relocate_section): Move PIC check for PC-relative
relocations to ...
(elf_x86_64_check_relocs): Here.
(elf_x86_64_finish_dynamic_symbol): Use SYMBOL_DEFINED_NON_SHARED_P
to check if a symbol is defined in a non-shared object.
* elfxx-x86.h (SYMBOL_DEFINED_NON_SHARED_P): New.

ld/

PR ld/24151
* testsuite/ld-x86-64/pr24151a-x32.d: New file.
* testsuite/ld-x86-64/pr24151a.d: Likewise.
* testsuite/ld-x86-64/pr24151a.s: Likewise.
* testsuite/ld-x86-64/x86-64.exp: Run pr24151a and pr24151a-x32.

(cherry picked from commit 83924b3846361f2f76f9a6e7b5afa01c0eebbd4f)

1532a93 2019-02-08 01:14:00 Eric Botcazou

SPARC: fix PR ld/18841

This fixes the last ld failures on SPARC64/Linux:

FAIL: Run pr18841 with libpr18841b.so
FAIL: Run pr18841 with libpr18841c.so
FAIL: Run pr18841 with libpr18841bn.so (-z now)
FAIL: Run pr18841 with libpr18841cn.so (-z now)

by mimicing what has been done on x86-64 and Aarch64 to fix the PR.

bfd/
PR ld/18841
* elf32-sparc.c (elf32_sparc_reloc_type_class): Return
reloc_class_ifunc for ifunc symbols.
* elf64-sparc.c (elf64_sparc_reloc_type_class): Likewise.

1c92e98 2019-02-08 01:13:32 Eric Botcazou

Visium: fix bogus overflow check on 32-bit hosts

bfd/
* elf32-visium.c (visium_elf_howto_parity_reloc): Minor tweak.
<R_VISIUM_PC16>: Use explicit range test to detect an overflow.

2629356 2019-02-08 01:12:43 Eric Botcazou

Visium: align branch absolute instruction for the GR6

This is done in order to avoid a pipeline hazard on the GR6.

gas/
* config/tc-visium.c (md_assemble) <mode_cad>: Align instruction
on 64-bit boundaries for the GR6.
* testsuite/gas/visium/allinsn_gr6.s: Tweak.
* testsuite/gas/visium/allinsn_gr6.d: Likewise.
* testsuite/gas/visium/bra-1.d: New test.
* testsuite/gas/visium/bra-1.s: Likewise.
* testsuite/gas/visium/visium.exp: Run bra-1 test.

d43a048 2019-01-29 18:17:34 Eric Botcazou

Skip ld/pr23169 on SPARC.

The test is already skipped on PowerPC and Aarch64 because it's invalid.

* testsuite/ld-ifunc/ifunc.exp: Skip pr23169 on SPARC.

595d734 2019-01-22 09:01:52 GDB Administrator

Automatic date update in version.in

8d87b79 2019-01-21 09:02:03 GDB Administrator

Automatic date update in version.in

6b53149 2019-01-20 09:02:38 GDB Administrator

Automatic date update in version.in

e2e8b2d 2019-01-19 09:02:01 GDB Administrator

Automatic date update in version.in

495a882 2019-01-18 09:02:13 GDB Administrator

Automatic date update in version.in

5ab4614 2019-01-17 09:02:12 GDB Administrator

Automatic date update in version.in

0275cea 2019-01-16 09:01:53 GDB Administrator

Automatic date update in version.in

afef1fb 2019-01-15 09:01:16 GDB Administrator

Automatic date update in version.in

8f41e0d 2019-01-14 09:01:13 GDB Administrator

Automatic date update in version.in

f21cd81 2019-01-13 09:03:07 GDB Administrator

Automatic date update in version.in

9e4da51 2019-01-12 09:01:21 GDB Administrator

Automatic date update in version.in

26bf3fb 2019-01-11 09:01:07 GDB Administrator

Automatic date update in version.in

1c912ac 2019-01-10 09:02:06 GDB Administrator

Automatic date update in version.in

c3cc814 2019-01-09 09:01:55 GDB Administrator

Automatic date update in version.in

ee68c5f 2019-01-08 09:02:11 GDB Administrator

Automatic date update in version.in

89e8cd3 2019-01-07 09:02:14 GDB Administrator

Automatic date update in version.in

b555b70 2019-01-06 09:02:32 GDB Administrator

Automatic date update in version.in

49d5112 2019-01-05 09:01:41 GDB Administrator

Automatic date update in version.in