Age | Commit message (Collapse) | Author | Files | Lines |
|
Change-Id: Id1126e73b8bbe641f3c80fc84b016bfa5df10571
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
cherry-picked from RS-TizenStudio/gcc-9.2/pull/10
Change-Id: I30e8222f838680785c22527ab9295bb9c2f9e902
Signed-off-by: Karthik Bhat <kv.bhat@samsung.com>
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
|
|
It denotes that object file doesn't rely on any C++ ABI.
Also this flag is used to skip C++ ABI validation in linker.
Change-Id: I1ed4be997190a2ffdc4642946743ee9908a30348
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
|
|
It could be configured via --with-annobin-cxx11-abi-exceptions option.
Also add dual C++ ABI stuff to the exception list.
Change-Id: I6b4482661c2704a6081242fc1c0a8c4932eba527
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
|
|
Change-Id: Icb766cf48e675d30a5843355679be786b6e531b7
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
Now Binutils can be tested just like GCC package, by defining run_tests to 1
Change-Id: I10a8667985ee3cd430ea8fbdbbd06653a4d72df8
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
Change-Id: I9fefe81e0ffbf16eed3c806a18df03e67ff668c8
Signed-off-by: Andrey Kazmin <a.kazmin@partner.samsung.com>
|
|
When building binutils with mingw-w64, I get the following errors:
make[4]: Entering directory '/home/simark/build/binutils-gdb-mingw/binutils'
/bin/sh ./libtool --tag=CC --mode=link ccache x86_64-w64-mingw32-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Wno-format -Werror -I/home/simark/src/binutils-gdb/binutils/../zlib -g3 -O0 -D__USE_MINGW_ACCESS -Wl,--stack,12582912 -o objdump.exe objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o ../opcodes/libopcodes.la ../libctf/libctf.la ../bfd/libbfd.la ../libiberty/libiberty.a -lintl
libtool: link: ccache x86_64-w64-mingw32-gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Wstack-usage=262144 -Wno-format -Werror -I/home/simark/src/binutils-gdb/binutils/../zlib -g3 -O0 -D__USE_MINGW_ACCESS -Wl,--stack -Wl,12582912 -o .libs/objdump.exe objdump.o dwarf.o prdbg.o rddbg.o debug.o stabs.o rdcoff.o bucomm.o version.o filemode.o elfcomm.o ../opcodes/.libs/libopcodes.a ../libctf/.libs/libctf.a -L/home/simark/build/binutils-gdb-mingw/zlib ../bfd/.libs/libbfd.a -lz ../libiberty/libiberty.a -lintl
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: ../libctf/.libs/libctf.a(ctf-open.o): in function `flip_header':
/home/simark/src/binutils-gdb/libctf/ctf-open.c:964: undefined reference to `bswap_16'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:967: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:968: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:969: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:970: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:971: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: ../libctf/.libs/libctf.a(ctf-open.o):/home/simark/src/binutils-gdb/libctf/ctf-open.c:972: more undefined references to `bswap_32' follow
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: ../libctf/.libs/libctf.a(ctf-open.o): in function `flip_types':
/home/simark/src/binutils-gdb/libctf/ctf-open.c:1112: undefined reference to `bswap_16'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:1113: undefined reference to `bswap_16'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:1132: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:1133: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:1134: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:1135: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: /home/simark/src/binutils-gdb/libctf/ctf-open.c:1144: undefined reference to `bswap_32'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: ../libctf/.libs/libctf.a(ctf-open.o):/home/simark/src/binutils-gdb/libctf/ctf-open.c:1145: more undefined references to `bswap_32' follow
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: ../libctf/.libs/libctf.a(ctf-open.o): in function `ctf_bufopen_internal':
/home/simark/src/binutils-gdb/libctf/ctf-open.c:1342: undefined reference to `bswap_16'
/usr/lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld: ../libctf/.libs/libctf.a(ctf-open-bfd.o): in function `ctf_fdopen':
/home/simark/src/binutils-gdb/libctf/ctf-open-bfd.c:268: undefined reference to `bswap_16'
Apparently [1], if we have a function with `inline` but not `static`,
there should be a compilation unit defining the symbol too.
Alternatively, making those functions `static` fixes that.
[1] https://stackoverflow.com/questions/16245521/c99-inline-function-in-c-file/16254679#16254679
libctf/ChangeLog:
* swap.h (bswap_16, bswap_32, bswap_64): Make static.
(cherry picked from commit cbbbc402e059ee345cb781d3ceb757ae1cc679ee)
Change-Id: I8fd12aedf6c90f9b7418af948e5e0bae0c32eead
|
|
Change-Id: I74fa9ab77b0bb1a4a9a9a461235d929d985bd4e7
Signed-off-by: Dongkyun Son <dongkyun.s@samsung.com>
|
|
This reverts commit 1173d36d74e6a3f37e14eb74fe462b2fe21097b5.
Change-Id: Ib806f5d5937aaca855c24389e18861870e26bf81
|
|
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
Change-Id: Id27d126ac3d940e72645de8f3e6b0f81c10c04c5
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
- Define annobin .note.gnu.property bits for sanitization/CxxABI checks
- New configure option --enable-annobin-verification=warn|strict to enable
runtime verification support for gnu property notes.
- Add merging support for compilation flags annobin gnu notes.
- Add readelf section text for compiler properties.
Change-Id: I452029baca753f6a97ef4b7297ef9a8905a7b79c
|
|
Passing CLFAGS, CXXFLAGS, LDFLAGS used previously on build stage cause failures
when running "make check". It's safer to clear them.
Change-Id: If2bba2baca0f99c3931af2a55739ff6a087f2b0f
Signed-off-by: Andrey Drobyshev <a.drobyshev@partner.samsung.com>
|
|
* Add list of dependent packages needed to build & run tests along with
corresponding macro run_tests;
* Add %check section.
Signed-off-by: Andrey Drobyshev <a.drobyshev@partner.samsung.com>
Change-Id: I2cc277d6855247747025a4d3b744a5c7804f4fca
|
|
Change-Id: I1abc28bf90731946353b86579e85bd391c1745d3
|
|
ChangeLog.Tizen is to keep track of private patches for Tizen binutils.
Change-Id: I1ca9709cbf7ef92f6d4b29ca7c71782c9541f94a
|
|
Put "extern" to multiply-defined variables in order to make
-fno-common work.
Change-Id: Ib5a882e3c536d868e8098e385823e50ac78f2d21
|
|
ld/configure --enable-new-dtags sets ld.bfd --enable-new-dtags option by
default.
The ld option switches on generation of DT_RUNPATH tag instead of DT_RPATH tag
which is deprecated and breaks LD_LIBRARY_PATH usage.
Debian binutils bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=835859
* ld/configure.ac: Add --enable-new-dtags option.
* ld/ldmain.c: Set link_info.new_dtags to 1 if when --enable-new-dtags is
switched on.
* ld/configure: Regenerate.
* ld/config.in: Regenerate.
* packaging/binutils.spec: Switch on --enable-new-dtags.
* packaging/binutils-armv7l.spec: Regenerate.
* packaging/binutils-aarch64.spec: Regenerate.
Change-Id: I0ec86f61a8b97d55c29bb441a9ae4db94060ea22
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
|
|
Allow cross-configured ld to ignore plugins that cannot be dlopened
Change-Id: I0bbca32123aeba869d843fdfb9179815af888f5c
Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
|
|
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
|
|
|
|
|
|
|
|
The testcase in the PR has two empty output sections, .sec1 with an
ALIGN and symbol assignment, and .sec2 just with an empty input
section. The symbol assignment results in .sec1 being kept, but
because it is empty this section doesn't take space from the memory
region as you might expect from the ALIGN. Instead the next section
.sec2, has vma/lma as if .sec1 wasn't present. However, .sec2 is
discarded and os->ignored set, which unfortunately meant that dot
wasn't set from .sec2 vma. That in turn results in .sec2 lma being
set incorrectly. That vma/lma difference is then propagated to
.sec3 where it is seen as an overlap.
PR 25081
* ldlang.c (lang_size_sections_1): Set lma from section vma
rather than dot.
(cherry picked from commit 8610e0fd93ea253f9beb9ebb6e50e8807ed83327)
|
|
Dynamic relocs are only needed in an executable for TLS symbols if
those are defined in an external module and even then TLS access
can be relaxed to use IE model instead of GD.
Several bfd_link_pic checks are turned into bfd_link_dll checks
to fix TLS handling in PIE, for the same fix some other targets
used !bfd_link_executable checks, but that includes relocatable
objects so dll seems safer (in most cases either should work, since
dynamic relocations are not applied in relocatable objects).
On arm* fixes
FAIL: Build pr22263-1
bfd/
PR ld/22263
PR ld/25056
* elf32-arm.c (elf32_arm_tls_transition): Use bfd_link_dll instead of
bfd_link_pic for TLS checks.
(elf32_arm_final_link_relocate): Likewise.
(allocate_dynrelocs_for_symbol): Likewise.
|
|
On 64-bit host the 32-bit addend was loaded without sign extension into
an unsigned long.
bfd/ChangeLog:
PR ld/25062
* elf32-arm.c (elf32_arm_final_link_relocate): Sign extend data.
ld/ChangeLog:
PR ld/25062
* testsuite/ld-arm/arm-elf.exp: Update.
* testsuite/ld-arm/tls-gdesc-neg.d: New test.
* testsuite/ld-arm/tls-gdesc-neg.s: New test.
|
|
|
|
|
|
's' is both a command and a modifier. If given as a command then we
aren't lacking an operation. I think the same goes when mri mode is
selected: any following command line used to be ignored.
PR 25079
* ar.c (decode_options): Don't try for command options if
write_armap or mri_mode is selected.
(cherry picked from commit b7d9d3ee59236d6039d7d7ccd17ff6b47e07a8aa)
|
|
ppc*_elf_tls_optimize decrements the PLT refcount for __tls_get_addr
when a GD or LD sequence can be optimized. Without tls marker relocs
this must be done when processing the argument setup relocations.
With marker relocs it's better done when processing the marker reloc.
But don't count them both ways.
Seen as "unresolvable R_PPC_REL24 relocation against symbol
`__tls_get_addr_opt'" (and other branch relocs).
* elf32-ppc.c (ppc_elf_tls_optimize): Don't process R_PPC_TLSLD
with non-local symbol. Don't double count __tls_get_addr calls
with marker relocs.
* elf64-ppc.c (ppc64_elf_tls_optimize): Likewise.
(cherry picked from commit 7d04a20ae4af0f1f6e75ec642413c27de4c1e1b8)
|
|
has_tls_get_addr_call is no longer named correctly as the flag is
only set on finding a __tls_get_addr call without tlsld/tlsgd marker
relocations.
* elf32-ppc.c (nomark_tls_get_addr): Rename from has_tls_get_addr_call
throughout.
* elf64-ppc.c (nomark_tls_get_addr): Likewise.
(cherry picked from commit 9737e8af48e257f24e860fbf36af8c314e73076a)
|
|
A bug crept into commit f749f26eea, which could cause linker
segfaults when creating PIEs. This patch fixes it.
* elf64-ppc.c (ppc64_elf_size_dynamic_sections): Do allocate
space for local got non-tls relocs when PIE.
(cherry picked from commit 93370e8e7b406cf0aeedcf57cf457c07d6a2c7e6)
|
|
1) GOT entries generated for any of the GOT TLS relocations don't need
dynamic relocations for locally defined symbols in PIEs. In the case
of a tls_index doubleword, the dtpmod entry is known to be 1, and the
dtprel entry is also known at link time and relative. Similarly,
dtprel and tprel words are known at link time and relative. (GOT
entries for other than TLS symbols are not relative and thus need
dynamic relocations in PIEs.)
2) Local dynamic TLS code is really only meant for accesses local to
the current binary. There was a cheapskate test for this before using
the common tlsld_got slot, but the test wasn't exactly correct and
might confuse anyone looking at the code. The proper test,
SYMBOL_REFERENCES_LOCAL isn't so expensive that it should be avoided.
3) The same cheap test for local syms when optimising TLS sequences
should be SYMBOL_REFERENCES_LOCAL too.
bfd/
* elf64-ppc.c (ppc64_elf_check_relocs): Move initialisation of vars.
(ppc64_elf_tls_optimize): Correct is_local condition.
(allocate_got): Don't reserve dynamic relocations for any of the
tls got relocs in PIEs when the symbol is local.
(allocate_dynrelocs): Correct validity test for local sym using
tlsld_got slot.
(ppc64_elf_size_dynamic_sections): Don't reserve dynamic relocations
for any of the tls got relocs in PIEs.
(ppc64_elf_layout_multitoc): Likewise.
(ppc64_elf_relocate_section): Correct validity test for local sym
using tlsld_got slot. Don't emit dynamic relocations for any of
the tls got relocs in PIEs when the symbol is local.
* elf32-ppc.c (ppc_elf_tls_optimize): Correct is_local condition.
(got_relocs_needed): Delete.
(allocate_dynrelocs): Correct validity test for local sym using
tlsld_got slot. Don't reserve dynamic relocations for any of the
tls got relocs in PIEs when the symbol is local.
(ppc_elf_size_dynamic_sections): Don't reserve dynamic relocations
for any of the tls got relocs in PIEs.
(ppc_elf_relocate_section): Correct validity test for local sym
using tlsld_got slot. Don't emit dynamic relocations for any of
the tls got relocs in PIEs when the symbol is local.
ld/
* testsuite/ld-powerpc/tlsso.d: Adjust to suit tlsld_got usage change.
* testsuite/ld-powerpc/tlsso.g: Likewise.
* testsuite/ld-powerpc/tlsso.r: Likewise.
* testsuite/ld-powerpc/tlsso32.d: Likewise.
* testsuite/ld-powerpc/tlsso32.g: Likewise.
* testsuite/ld-powerpc/tlsso32.r: Likewise.
(cherry picked from commit f749f26eea052459c27e21d0d15f5fac060961dc)
|
|
section"
PR 25046
* readelf.c (process_program_headers): Clear dynamic_addr and
dynamic_size earlier.
(cherry picked from commit 663f67df1e8a7ac0ab8c8c577817067ca32ea4be)
|
|
bfd/
PR 24262
* Makefile.am (AM_CPPFLAGS): Add -DLIBDIR.
* plugin.c (load_plugin): Search both ${libdir}/bfd-plugins and
${bindir}/../lib/bfd-plugins if different.
* Makefile.in: Regenerate.
ld/
PR 24262
* ld.texi (-plugin): Revert 2019-03-15 change.
(cherry picked from commit 41f37a6fb71f2a3de388108f5cdfca9cbe6e9d51)
|
|
|
|
|
|
|
|
|
|
Commit 21df382b91 ("x86: fold SReg{2,3}") went too far: Folding 64-bit
PUSH/POP templates into non-64-bit ones isn't correct, due to the
different operand widths, and hence suffixes permitted. Restore the
separate templates.
Add tests of PUSH/POP with q suffix and %fs/%gs operands to the
testsuite. While doing so also add PUSHF/POPF ones _without_ suffix.
(cherry picked from commit 3f9aad111cea2f25877d0a6b404956769c14faee)
|
|
|
|
|
|
alignment value rather than a power of two alignment value.
PR 24942
* objcopy.c (copy_usage): Update description of
--set-section-alignment.
(copy_main): Interpret numeric argument of --set-section-alignment
as a byte alignment, not a power of two alignment.
* doc/binutils.texi: Update description of
--set-section-alignment.
* testsuite/binutils-all/set-section-alignment.d: New test.
* testsuite/binutils-all/objcopy.exp: Run the new test.
|
|
|
|
|
|
|
|
|
|
|