Commit Graph

104637 Commits

Author SHA1 Message Date
GDB Administrator
fbb9a7e337 Automatic date update in version.in 2021-03-09 00:00:51 +00:00
GDB Administrator
17affd070e Automatic date update in version.in 2021-03-08 00:00:50 +00:00
GDB Administrator
1e98aad26a Automatic date update in version.in 2021-03-07 00:00:55 +00:00
GDB Administrator
13c558caa5 Automatic date update in version.in 2021-03-06 00:00:38 +00:00
GDB Administrator
c60a71cb7b Automatic date update in version.in 2021-03-05 00:00:50 +00:00
GDB Administrator
0fc2da7221 Automatic date update in version.in 2021-03-04 00:00:51 +00:00
GDB Administrator
b95bb98a8c Automatic date update in version.in 2021-03-03 00:00:47 +00:00
Alan Modra
e748f8e407 PowerPC64 undefined weak visibility vs GOT optimisation
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 f5b9c288a3)
2021-03-02 21:58:03 +10:30
GDB Administrator
339bc7c4a2 Automatic date update in version.in 2021-03-02 00:00:54 +00:00
Alan Modra
e3316baf92 PR27441, inconsistency in weak definitions
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 bbaddd4bbe)
2021-03-01 14:52:20 +10:30
GDB Administrator
54a12d44be Automatic date update in version.in 2021-03-01 00:01:04 +00:00
GDB Administrator
d9869a51f5 Automatic date update in version.in 2021-02-28 00:00:36 +00:00
GDB Administrator
0c1eff5884 Automatic date update in version.in 2021-02-27 00:00:47 +00:00
Alan Modra
1aad0a424a Re: Use make_tempname file descriptor in smart_rename
PR 27456
	* rename.c (simple_copy): Mark target_stat ATTRIBUTE_UNUSED.

(cherry picked from commit 40b02646ec)
2021-02-26 17:58:30 +10:30
Alan Modra
08bdb5f4f9 Use make_tempname file descriptor in smart_rename
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 c42c71a152)
2021-02-26 17:58:30 +10:30
Alan Modra
8b69e61d4b PR27456, lstat in rename.c on MinGW
PR 27456
	* rename.c: Tidy throughout.
	(smart_rename): Always copy.  Remove windows specific code.

(cherry picked from commit cca8873dd5)
2021-02-26 17:58:30 +10:30
Alan Modra
d3edaa91d4 Reinstate various pieces backed out from smart_rename changes
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 8e03235147 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 95b91a043a)
2021-02-26 17:58:30 +10:30
GDB Administrator
d5eb4926df Automatic date update in version.in 2021-02-26 00:00:42 +00:00
GDB Administrator
7b7c7090a2 Automatic date update in version.in 2021-02-25 00:00:46 +00:00
GDB Administrator
81e690eb25 Automatic date update in version.in 2021-02-24 00:00:46 +00:00
GDB Administrator
0e7d2fad24 Automatic date update in version.in 2021-02-23 00:00:38 +00:00
Siddhesh Poyarekar
8e03235147 binutils: Avoid renaming over existing files
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 3685de750e)
2021-02-22 20:45:50 +05:30
GDB Administrator
ab28570771 Automatic date update in version.in 2021-02-22 00:00:39 +00:00
GDB Administrator
18616da8c6 Automatic date update in version.in 2021-02-21 00:00:37 +00:00
GDB Administrator
1fcea283a6 Automatic date update in version.in 2021-02-20 00:00:44 +00:00
Andreas Krebbel
5ffe9b0dbb IBM Z: Implement instruction set extensions
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 ba2b480f10)
2021-02-19 14:19:12 +01:00
GDB Administrator
7d94cf9f43 Automatic date update in version.in 2021-02-19 00:00:42 +00:00
GDB Administrator
601b3a7271 Automatic date update in version.in 2021-02-18 00:01:11 +00:00
GDB Administrator
d5cb9eec8b Automatic date update in version.in 2021-02-17 00:00:45 +00:00
GDB Administrator
72cb7a704d Automatic date update in version.in 2021-02-16 00:00:44 +00:00
GDB Administrator
b8517f8f96 Automatic date update in version.in 2021-02-15 00:00:33 +00:00
GDB Administrator
1ffaa86f28 Automatic date update in version.in 2021-02-14 00:00:54 +00:00
GDB Administrator
17124df60e Automatic date update in version.in 2021-02-13 00:00:34 +00:00
GDB Administrator
c668066dad Automatic date update in version.in 2021-02-12 00:00:50 +00:00
GDB Administrator
a26fdfa101 Automatic date update in version.in 2021-02-11 00:00:38 +00:00
GDB Administrator
9004a5433b Automatic date update in version.in 2021-02-10 00:00:52 +00:00
Alan Modra
7651a4871c PR27382, build failure if fileno() is a macro
PR 27382
	* objcopy.c (copy_file): Use bfd_stat.
2021-02-09 13:37:59 +10:30
GDB Administrator
179cd8fe06 Automatic date update in version.in 2021-02-09 00:00:47 +00:00
GDB Administrator
ad052fe2c4 Automatic date update in version.in 2021-02-08 00:00:46 +00:00
H.J. Lu
43f6058fb2 ld: Remove x86 ISA level run-time tests
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 38a143aa8c)
2021-02-07 14:36:38 -08:00
GDB Administrator
bc7e7ec113 Automatic date update in version.in 2021-02-07 00:00:32 +00:00
Nick Clifton
d4dfaba218 Reset development back to true 2021-02-06 09:21:36 +00:00
Nick Clifton
f35674005e This is 2.36.1 release 2021-02-06 09:12:37 +00:00
GDB Administrator
035f70706f Automatic date update in version.in 2021-02-06 00:00:35 +00:00
Nick Clifton
355e5f2ffb Revert "binutils: Make smart_rename safe too"
This reverts commit 014cc7f849.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
2021-02-05 14:14:01 +00:00
Nick Clifton
a708e76442 Revert "Fix a build problem when using FreeBSD 12."
This reverts commit b143e2d506.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
2021-02-05 14:12:24 +00:00
Nick Clifton
97c8a8cc3f Revert "pr27270 and pr27284, ar segfaults and wrong file mode"
This reverts commit 95b91a043a.
Given the problems associated with this patch and the others intended to fix the smart_rename CVE, the decision has been taken to$
2021-02-05 14:10:21 +00:00
Nick Clifton
86cb5ea563 Revert "PR27345, binutils/arsup.c: lstat() not available on all targets"
This reverts commit c0034ac596.
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.
2021-02-05 14:08:16 +00:00
Alan Modra
c0034ac596 PR27345, binutils/arsup.c: lstat() not available on all targets
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 c180f095f3)
2021-02-05 15:15:14 +10:30
Nelson Chu
faca03e59f RISC-V: Removed the v0.93 bitmanip ZBA/ZBB/ZBC instructions.
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*.
2021-02-05 09:26:24 +08:00