| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This stops problems parallel-installing if a relink of libctf is needed.
Also adds corresponding install-strip dependencies.
ChangeLog
2021-03-02 Nick Alcock <nick.alcock@oracle.com>
PR libctf/27482
* Makefile.def: Add install-bfd dependencies for install-libctf and
install-ld, and install-strip-bfd dependencies for
install-strip-libctf and install-strip-ld; move the install-ld
dependency on install-libctf to join it.
* Makefile.in: Regenerated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Undefined weak symbols with non-default visibility are seen as local
by SYMBOL_REFERENCES_LOCAL. This stops a got indirect to relative
optimisation for them, so that pies and dlls don't get non-zero values
when loading somewhere other than the address they are linked at
(which always happens). The optimisation could be allowed for pdes,
but I thought it best not to allow it there too.
bfd/
* elf64-ppc.c (ppc64_elf_relocate_section): Don't optimise got
indirect to pc-relative or toc-relative for undefined symbols.
ld/
* testsuite/ld-powerpc/weak1.d,
* testsuite/ld-powerpc/weak1.r,
* testsuite/ld-powerpc/weak1.s,
* testsuite/ld-powerpc/weak1so.d,
* testsuite/ld-powerpc/weak1so.r: New tests.
* testsuite/ld-powerpc/powerpc.exp: Run them.
(cherry picked from commit f5b9c288a3057f0f04e74f00fdb0e79d171d54a8)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes IR objects use the same logic as normal objects with
respect to what sort of ref/def makes an as-needed library needed.
Testing the binding of the definition is just plain wrong. What
matters is the binding of the reference.
PR 27441
* elf-bfd.h (struct elf_link_hash_entry): Add ref_ir_nonweak.
* elflink.c (elf_link_add_object_symbols): Set ref_ir_nonweak and
use when deciding an as-needed library should be loaded instead
of using the binding of the library definition.
(cherry picked from commit bbaddd4bbeba65200ee805d87c2e3a845842e3eb)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
PR 27456
* rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.
(cherry picked from commit 40b02646ec5b197e63ba904f95ea101d95a50cf4)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes use of the temp file descriptor in smart_rename
rather than reopening the file. I don't believe there is a security
issue in reopening the file, but this way is one less directory
operation. The patch also attempts to preserve S_ISUID and S_ISGID.
PR 27456
* bucomm.h (smart_rename): Update prototype.
* rename.c (smart_rename): Add fromfd and preserve_dates params.
Pass fromfd and target_stat to simple_copy. Call set_times
when preserve_dates.
(simple_copy): Accept fromfd rather than from filename. Add
target_stat param. Rewind fromfd rather than opening. Open
"to" file without O_CREAT. Try to preserve S_ISUID and S_ISGID.
* ar.c (write_archive): Rename ofd to tmpfd. Dup tmpfd before
closing output temp file, and pass tmpfd to smart_rename.
* arsup.c (temp_fd): Rename from real_fd.
(ar_save): Dup temp_fd and pass to smart_rename.
* objcopy.c (strip_main, copy_main): Likewise, and pass
preserve_dates.
(cherry picked from commit c42c71a1527dd70417d3966dce7ba9edbcf4bdb4)
|
|
|
|
|
|
|
|
| |
PR 27456
* rename.c: Tidy throughout.
(smart_rename): Always copy. Remove windows specific code.
(cherry picked from commit cca8873dd5a6015d5557ea44bc1ea9c252435a29)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interests of a stable release various last minute smart_rename
patches were backed out of the 2.36 branch. The main reason to
reinstate some of those backed out changes here is to make necessary
followup fixes to commit 8e03235147a9 simple cherry-picks from
mainline. A secondary reason is that ar -M support isn't fixed for
pr26945 without this patch.
PR 26945
* ar.c: Don't include libbfd.h.
(write_archive): Replace xmalloc+strcpy with xstrdup.
* arsup.c (temp_name, real_ofd): New static variables.
(ar_open): Use make_tempname and bfd_fdopenw.
(ar_save): Adjust to suit ar_open changes.
* objcopy.c: Don't include libbfd.h.
* rename.c: Rename and reorder variables.
(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Renaming over existing files needs additional care to restore
permissions and ownership, which may not always succeed.
Additionally, other properties of the file such as extended attributes
may be lost, making the operation flaky.
For predictable results, resort to rename() only if the file does not
exist, otherwise copy the file contents into the existing file. This
ensures that no additional tricks are needed to retain file
properties.
This also allows dropping of the redundant set_times on the tmpfile in
objcopy/strip since now we no longer rename over existing files.
binutils/
* ar.c (write_archive): Adjust call to SMART_RENAME.
* arsup.c (ar_save): Likewise.
* objcopy (strip_main): Don't set times on temporary file and
adjust call to SMART_RENAME.
(copy_main): Likewise.
* rename.c [!S_ISLNK]: Remove definitions.
(try_preserve_permissions): Remove function.
(smart_rename): Replace PRESERVE_DATES argument with
TARGET_STAT. Use rename system call only if TO does not exist.
* bucomm.h (smart_rename): Adjust declaration.
(cherry picked from commit 3685de750e6a091663a0abe42528cad29e960e35)
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
opcodes/
* s390-mkopc.c (main): Accept arch14 as cpu string.
* s390-opc.txt: Add new arch14 instructions.
include/
* opcode/s390.h (enum s390_opcode_cpu_val): Add
S390_OPCODE_ARCH14.
gas/
* config/tc-s390.c (s390_parse_cpu): New entry for arch14.
* doc/c-s390.texi: Document arch14 march option.
* testsuite/gas/s390/s390.exp: Run the arch14 related tests.
* testsuite/gas/s390/zarch-arch14.d: New test.
* testsuite/gas/s390/zarch-arch14.s: New test.
(cherry picked from commit ba2b480f1037082d27da1afdfe0793c8aac9b1bd)
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
PR 27382
* objcopy.c (copy_file): Use bfd_stat.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove x86 ISA level run-time tests since with glibc 2.33, they will fail
to run on machines with lesser x86 ISA level:
tmpdir/property-5-pie: CPU ISA level is lower than required
PR ld/27358
* testsuite/ld-i386/i386.exp: Remove property 3/4/5 run-time
tests.
* testsuite/ld-x86-64/x86-64.exp: Likewise.
(cherry picked from commit 38a143aa8c633225e000fd006a5a171f0b6c80ee)
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 014cc7f849e8209623fc99264814bce7b3b6faf2.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
|
|
|
|
|
| |
This reverts commit b143e2d506bee1020752597f979d5af174edc36d.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
|
|
|
|
|
| |
This reverts commit 95b91a043aeaeb546d2fea556d84a2de1e917770.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
|
|
|
|
|
| |
This reverts commit c0034ac596db89dfb5fa007a63488ad7af555fe9.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to revert the patches for the 2.36.1 point release.
|
|
|
|
|
|
|
|
|
| |
We can just use stat here, the same as is done in ar.c:open_inarch.
PR 27345
* arsup.c (ar_save): Use stat rather than lstat.
(cherry picked from commit c180f095f32ca62f138da9bc7fb96cac0365fb5d)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
* elfxx-riscv.c (riscv_parse_prefixed_ext): Removed zb*.
gas/
* config/tc-riscv.c (riscv_multi_subset_supports): Removed
INSN_CLASS_ZB*.
* testsuite/gas/riscv/bitmanip-insns-32.d: Removed.
* testsuite/gas/riscv/bitmanip-insns-64.d: Removed.
* testsuite/gas/riscv/bitmanip-insns.s: Removed.
include/
* opcode/riscv-opc.h: Removed macros for zb* extensions.
* opcode/riscv.h (riscv_insn_class): Removed INSN_CLASS_ZB*.
opcodes/
* riscv-opc.c (MASK_RVB_IMM): Removed.
(riscv_opcodes): Removed zb* instructions.
(riscv_ext_version_table): Removed versions for zb*.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
commit 7d409ac001cce916661d345bff01ed589991e762
Author: Alan Modra <amodra@gmail.com>
Date: Thu Feb 4 13:56:34 2021 +1030
PR27311, (symbol from plugin): undefined reference, hidden sym
fixed PR ld/15146. Restore PR ld/15146 tests.
PR ld/15146
* testsuite/ld-plugin/lto.exp: Run PR ld/15146 tests.
* testsuite/ld-plugin/pr15146.d: Restored.
* testsuite/ld-plugin/pr15146a.c: Likewise.
* testsuite/ld-plugin/pr15146b.c: Likewise.
* testsuite/ld-plugin/pr15146c.c: Likewise.
* testsuite/ld-plugin/pr15146d.c: Likewise.
(cherry picked from commit 37707bd8221c2e3f7676de8bee0c42ce3ab38c77)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bfd/
PR 27311
* elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
libraries for IR references on pass over libraries after LTO
recompilation.
ld/
* testsuite/ld-plugin/pr27311d.c: New test.
* testsuite/ld-plugin/lto.exp: Rename pr27311 to pr27311-1, compile
and link new test as pr27311-2.
(cherry picked from commit 7d409ac001cce916661d345bff01ed589991e762)
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PR 27270
PR 27284
PR 26945
* ar.c: Don't include libbfd.h.
(write_archive): Replace xmalloc+strcpy with xstrdup. Use
bfd_stat rather than fstat on iostream. Move stat and fd tests
outside of _WIN32 ifdef. Delete skip_stat variable.
* arsup.c (temp_name, real_ofd): New static variables.
(ar_open): Use make_tempname and bfd_fdopenw.
(ar_save): Adjust to suit ar_open changes. Move stat output
of _WIN32 ifdef.
* objcopy.c: Don't include libbfd.h.
(copy_file): Use bfd_stat.
(cherry picked from commit 95b91a043aeaeb546d2fea556d84a2de1e917770)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A default versioned symbol definition in a shared library is
overridden by an unversioned definition in a regular object file, and
thus should not be reason to make an as-needed library needed.
bfd/
PR 27311
* elflink.c (elf_link_add_object_symbols): Don't pull in as-needed
libraries when H is an indirect symbol after calling
_bfd_elf_add_default_symbol.
ld/
* testsuite/ld-ifunc/ifunc.exp (libpr16467b.so, libpr16467bn.so):
Link with --as-needed.
* testsuite/ld-plugin/pr27311.d,
* testsuite/ld-plugin/pr27311.ver,
* testsuite/ld-plugin/pr27311a.c,
* testsuite/ld-plugin/pr27311b.c,
* testsuite/ld-plugin/pr27311c.c: New testcase.
* testsuite/ld-plugin/lto.exp: Run it. Correct PR14918 and
PR12982 entries.
(cherry picked from commit 9918bff7cf2a566aaa2036d2242a61c140652dc7)
(cherry picked from commit 6955136728a68365bbb5e6e1327dff1654b2a0ca)
(cherry picked from commit f01fb44c0621b064996493bb5acd5077646ea84e)
|