[Bug binutils/24281] New: Failed with “thin archive” if it contain subdir's object file
https://sourceware.org/bugzilla/show_bug.cgi?id=24281 Bug ID: 24281 Summary: Failed with “thin archive” if it contain subdir's object file Product: binutils Version: 2.26 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: qwertytmp1 at gmail dot com Target Milestone: --- Please use following shell commands to reproduce the problem: ``` # create subdirectory mkdir subdir # create source files with dummy functions echo 'void func1(){}' > file1.c echo 'void func2(){}' > ./subdir/file2.c # compiling sources into object files gcc -c file1.c -o file1.o gcc -c ./subdir/file2.c -o ./subdir/file2.o # creating "thin archive" file from object files ar crT out.a file1.o ./subdir/file2.o # running objcopy, which leads to an error objcopy out.a out_copy.a ``` As a result, following error occurs: ``` objcopy:st0AENRL/subdir/file2.o: No such file or directory ``` Problem with objcopy occurs when "thin" archive is composed of object files from subdirectories. P.S. Problem was also described on StackOverflow: https://stackoverflow.com/questions/54907402/problem-while-using-objcopy-with-thin-archive-file -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24281] Failed with “thin archive” if it contain subdir's object file
https://sourceware.org/bugzilla/show_bug.cgi?id=24281 lol lol changed: What|Removed |Added Version|2.26|2.32 --- Comment #1 from lol lol --- Bug was reproduced on versions 2.26 and 2.32. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/20113] Partial relro support for s390x ld
https://sourceware.org/bugzilla/show_bug.cgi?id=20113 Andreas Krebbel changed: What|Removed |Added CC||krebbel at linux dot ibm.com --- Comment #12 from Andreas Krebbel --- I've implemented the relro support for Binutils based on the work from Marcin Kościelnicki. Marcin unfortunately didn't finish the bounty so I had to complete it myself. I've decided to do this only for S/390 64 bit since 32 bit binaries do not have a bright future anyway. Unfortunately I forgot to close this bugzilla accordingly. I think the patch posted here is wrong. SEPARATE_GOTPLT must remain as 0 on our platform. Please revert the patch. Here the patches which implement partial relro for IBM Z: commit afca762f598d453c563f244cd315b1a0cb72 Author: Andreas Krebbel Date: Thu Dec 21 13:12:03 2017 +0100 S/390: Improve partial relro support for 64 bit commit a38137289e91fd548fc27fb6566a439233b94d65 Author: Andreas Krebbel Date: Mon Jun 11 13:23:00 2018 +0200 ld: Enable using separate linker script for -z relro With this patch dedicated linker scripts can be generated for partial relro triggered by defining GENERATE_RELRO_SCRIPT in the target specific scripts. This is necessary for e.g. S/390 where usually the .got.plt comes first and prevents the relro segment from being extended across the non-plt GOT entries. The patch started with the work from Marcin taken from the mwk user branches. However, the patch needed substantial changes due to the 'separate code' feature which got committed in the meantime. ld/ChangeLog: 2018-07-18 Andreas Krebbel Marcin Kościelnicki -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/20113] Partial relro support for s390x ld
https://sourceware.org/bugzilla/show_bug.cgi?id=20113 --- Comment #13 from Andreas Krebbel --- Unfortunately the patch also went into 2.32 release :( At least for 64 bit the patch doesn't hurt since it is a nop. The code currently looks like: EXTRA_EM_FILE=s390 SEPARATE_GOTPLT=24 <--- the line added with the patch IREL_IN_PLT= SEPARATE_GOTPLT=0 <--- the line added with my patch test -z "$RELRO" && unset SEPARATE_GOTPLT -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24279] ARMv8.5 extension incorrectly named "predres" instead of "predinv"
https://sourceware.org/bugzilla/show_bug.cgi?id=24279 --- Comment #2 from Sudakshina Das --- Hi Richard We chose the name based on what instructions it is turning on - [Control Flow/Data Value/Cache Prefetch] Prediction Restriction by Context I agree that the internal naming is different. However, I believe the user option would be more suited to reflect the instructions it turns on. This name was also agreed on with our LLVM team where it is already upstream too. Sudi -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24258] v8.5 extension "frintts" missing as a separate feature
https://sourceware.org/bugzilla/show_bug.cgi?id=24258 --- Comment #3 from Sudakshina Das --- Hi Richard Sorry for the delay in getting back on this. I agree that the specs say that any Armv8.[N+1] feature is optional on Armv8.x. However in order to implement that, we would have to make every feature optional not just frintts. We chose to keep these features independent internally by giving them new feature macros so that if and when someone implements a Armv8.[N+1] feature optionally in a Armv8.N, it can be easily updated. Thus not giving features like frintts a user facing option was a conscious decision we took while implementing. Sudi -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gold/20114] Partial relro support for s390x gold
https://sourceware.org/bugzilla/show_bug.cgi?id=20114 Andreas Krebbel changed: What|Removed |Added CC||krebbel at linux dot ibm.com -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #11 from Martin Liška --- I've got a patch candidate that can solve it: diff --git a/bfd/coffgen.c b/bfd/coffgen.c index 309e1249ac..1d200b066b 100644 --- a/bfd/coffgen.c +++ b/bfd/coffgen.c @@ -2678,9 +2678,9 @@ _bfd_coff_section_already_linked (bfd *abfd, and match any comdat section with comdat name of , and any linkonce section with the same suffix, ie. .gnu.linkonce.*.. */ - if (((s_comdat != NULL) == (l_comdat != NULL) - && strcmp (name, l->sec->name) == 0) - || (l->sec->owner->flags & BFD_PLUGIN) != 0) + if (((s_comdat != NULL) == (l_comdat != NULL)) + && ((strcmp (name, l->sec->name) == 0) +|| (l->sec->owner->flags & BFD_PLUGIN) != 0)) { /* The section has already been linked. See if we should issue a warning. */ However, Honza is still thinking that LDPR_PREVAILING_DEF_IRONLY should be used for the symbol. If I see correctly it's set in ld/plugin.c base on else if (owner_sec->owner == abfd). Can you please help me where sections are set for each symbol? Is it a COFF specific code? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #12 from H.J. Lu --- (In reply to Martin Liška from comment #11) > I've got a patch candidate that can solve it: > > diff --git a/bfd/coffgen.c b/bfd/coffgen.c > index 309e1249ac..1d200b066b 100644 > --- a/bfd/coffgen.c > +++ b/bfd/coffgen.c > @@ -2678,9 +2678,9 @@ _bfd_coff_section_already_linked (bfd *abfd, >and match any comdat section with comdat name of , and >any linkonce section with the same suffix, ie. >.gnu.linkonce.*.. */ > - if (((s_comdat != NULL) == (l_comdat != NULL) > -&& strcmp (name, l->sec->name) == 0) > - || (l->sec->owner->flags & BFD_PLUGIN) != 0) > + if (((s_comdat != NULL) == (l_comdat != NULL)) > + && ((strcmp (name, l->sec->name) == 0) > +|| (l->sec->owner->flags & BFD_PLUGIN) != 0)) > { > /* The section has already been linked. See if we should >issue a warning. */ > > However, Honza is still thinking that LDPR_PREVAILING_DEF_IRONLY should be > used for the symbol. If I see correctly it's set in ld/plugin.c base on > else if (owner_sec->owner == abfd). What do ELF linkers (gold and bfd) get? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #13 from Martin Liška --- > > What do ELF linkers (gold and bfd) get? We get: (gdb) p owner_sec->owner->filename $5 = 0x69ae80 "main.o (symbol from plugin)" -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #14 from H.J. Lu --- (In reply to Martin Liška from comment #13) > > > > What do ELF linkers (gold and bfd) get? > > We get: > > (gdb) p owner_sec->owner->filename > $5 = 0x69ae80 "main.o (symbol from plugin)" Do gold and bfd get the same symbol resolution? -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #15 from Martin Liška --- Yes, both return: ... 262 545ca41eb4de6c9c PREVAILING_DEF _ZNKSt5ctypeIcE8do_widenEc -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24273] An out-of-bounds read in bfd_hash_hash()
https://sourceware.org/bugzilla/show_bug.cgi?id=24273 Nick Clifton changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #3 from Nick Clifton --- (In reply to Mingi Cho from comment #2) Hi Mingi, > CC=clang-5.0 CXX=clang++-5.0 CFLAGS="-m32 -g -O0 -fsanitize=address > -fsanitize-recover=address" CXXFLAGS="-m32 -g -O0 -fsanitize=address > -fsanitize-recover=address" Ah, yes, I cannot build a toolchain configured that way. There is a long standing problem with Fedora and 32-bit address sanitization: ==29514==Shadow memory range interleaves with an existing memory mapping. ASan cannot proceed correctly. ABORTING. Fortunately I was able to reproduce the problem using valgrind instead. The bug is a nasty one - the corrupt file has the string table index field in the ELF header pointing to a group section, whose contents are of course not NUL-terminated. This leads to an attempt to compute a hash value from an unterminated string which then triggers the fault. I have checked in a patch to fix the problem, by adding code to ensure that if a string retrieved from the string section is not properly terminated then an error value will be returned. Cheers Nick -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24273] An out-of-bounds read in bfd_hash_hash()
https://sourceware.org/bugzilla/show_bug.cgi?id=24273 --- Comment #4 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Nick Clifton : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=eed5def8d0b7b64c3592be75a9b22bb4ce1a78f4 commit eed5def8d0b7b64c3592be75a9b22bb4ce1a78f4 Author: Nick Clifton Date: Thu Feb 28 14:30:20 2019 + Prevent a buffer overrun error when attempting to parse a corrupt ELF file. PR 24273 * elf.c (bfd_elf_string_from_elf_section): Check for a string section that is not NUL terminated. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #16 from H.J. Lu --- (In reply to Martin Liška from comment #15) > Yes, both return: > > ... > 262 545ca41eb4de6c9c PREVAILING_DEF _ZNKSt5ctypeIcE8do_widenEc Since it is referenced from istream-inst.o, it must be _ZNKSt5ctypeIcE8do_widenEc. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 --- Comment #17 from H.J. Lu --- (In reply to H.J. Lu from comment #16) > (In reply to Martin Liška from comment #15) > > Yes, both return: > > > > ... > > 262 545ca41eb4de6c9c PREVAILING_DEF _ZNKSt5ctypeIcE8do_widenEc > > Since it is referenced from istream-inst.o, it must be > _ZNKSt5ctypeIcE8do_widenEc. I meant it must be PREVAILING_DEF and can't be PREVAILING_DEF_IRONLY. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24258] v8.5 extension "frintts" missing as a separate feature
https://sourceware.org/bugzilla/show_bug.cgi?id=24258 --- Comment #4 from Richard Henderson --- But we *do* make every other feature optional. That is exactly my point -- frintts is the odd man out. See aarch64_features[], where we currently list 24 of these. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24279] ARMv8.5 extension incorrectly named "predres" instead of "predinv"
https://sourceware.org/bugzilla/show_bug.cgi?id=24279 Richard Henderson changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #3 from Richard Henderson --- Ah, well. Too late, I suppose. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24258] v8.5 extension "frintts" missing as a separate feature
https://sourceware.org/bugzilla/show_bug.cgi?id=24258 --- Comment #5 from Sudakshina Das --- If we take Armv8.5-A as an example and if we check include/opcode/aarch64.h for all the new feature bits added /* Flag Manipulation insns. */ #define AARCH64_FEATURE_FLAGMANIP 0x40ULL /* FRINT[32,64][Z,X] insns. */ #define AARCH64_FEATURE_FRINTTS 0x80ULL /* SB instruction. */ #define AARCH64_FEATURE_SB 0x100ULL /* Execution and Data Prediction Restriction instructions. */ #define AARCH64_FEATURE_PREDRES 0x200ULL /* DC CVADP. */ #define AARCH64_FEATURE_CVADP 0x400ULL /* Random Number instructions. */ #define AARCH64_FEATURE_RNG 0x800ULL /* BTI instructions. */ #define AARCH64_FEATURE_BTI 0x1000ULL /* SCXTNUM_ELx. */ #define AARCH64_FEATURE_SCXTNUM 0x2000ULL /* ID_PFR2 instructions. */ #define AARCH64_FEATURE_ID_PFR2 0x4000ULL /* SSBS mechanism enabled. */ #define AARCH64_FEATURE_SSBS0x8000ULL /* Memory Tagging Extension. */ #define AARCH64_FEATURE_MEMTAG 0x1ULL These can all be potentially added by a ARMv8.4-A implementation but do not all have command line options. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24272] An out-of-bounds read occured in pex64_xdata_print_uwd_codes()
https://sourceware.org/bugzilla/show_bug.cgi?id=24272 Alan Modra changed: What|Removed |Added Status|UNCONFIRMED |ASSIGNED Last reconfirmed||2019-03-01 Assignee|unassigned at sourceware dot org |amodra at gmail dot com Ever confirmed|0 |1 --- Comment #2 from Alan Modra --- Testing a fix -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24272] An out-of-bounds read occured in pex64_xdata_print_uwd_codes()
https://sourceware.org/bugzilla/show_bug.cgi?id=24272 --- Comment #3 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by Alan Modra : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b24cc4146e4de9f3b66e2e2fb8379db46eff89c9 commit b24cc4146e4de9f3b66e2e2fb8379db46eff89c9 Author: Alan Modra Date: Fri Mar 1 09:28:47 2019 +1030 PR24272, out-of-bounds read in pex64_xdata_print_uwd_codes The fix here is to use an unsigned comparison for if (a->NumberOfRvaAndSizes > IMAGE_NUMBEROF_DIRECTORY_ENTRIES) include/ PR 24272 * coff/internal.h (struct internal_extra_pe_aouthdr): Change type of SizeOfCode, SizeOfInitializedData, and SizeOfUninitializedData to bfd_vma. Change type of SectionAlignment, FileAlignment, Reserved1, SizeOfImage, SizeOfHeaders, CheckSum, LoaderFlags, and NumberOfRvaAndSizes to uint32_t. bfd/ PR 24272 * peXXigen.c (_bfd_XXi_swap_aouthdr_in): Use unsigned index. (_bfd_XX_print_private_bfd_data_common): Adjust for type changes. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24272] An out-of-bounds read occured in pex64_xdata_print_uwd_codes()
https://sourceware.org/bugzilla/show_bug.cgi?id=24272 Alan Modra changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|--- |FIXED Target Milestone|--- |2.33 --- Comment #4 from Alan Modra --- Fixed -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24235] objdump: Read memory violation in libbfd.c
https://sourceware.org/bugzilla/show_bug.cgi?id=24235 Alan Modra changed: What|Removed |Added CC||u6759601 at anu dot edu.au --- Comment #4 from Alan Modra --- *** Bug 24278 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24278] pdata section wrong filepos - segmentation fault
https://sourceware.org/bugzilla/show_bug.cgi?id=24278 Alan Modra changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED CC||amodra at gmail dot com Resolution|--- |DUPLICATE --- Comment #1 from Alan Modra --- Fixed by the patch for pr24235 *** This bug has been marked as a duplicate of bug 24235 *** -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug gas/24258] v8.5 extension "frintts" missing as a separate feature
https://sourceware.org/bugzilla/show_bug.cgi?id=24258 --- Comment #6 from Richard Henderson --- All you've told me here so far is that there are more missing bits. So, what, is ARM changing its collective mind about maintaining aarch64_features? If you're going to stop adding flags to .arch, what is the point of having .arch at all? You might as well go the way of x86 and just accept all opcodes all of the time. Save the programmer the hassle of trying to work out what spelling turns on the insn within the assembler. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24235] objdump: Read memory violation in libbfd.c
https://sourceware.org/bugzilla/show_bug.cgi?id=24235 --- Comment #5 from spinpx --- CVE-2019-9074 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24236] size: Heap buffer overflow in _bfd_archive_64_bit_slurp_armap
https://sourceware.org/bugzilla/show_bug.cgi?id=24236 --- Comment #4 from spinpx --- CVE-2019-9075 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug binutils/24243] readelf: heap buffer overflow in process_mips_specific
https://sourceware.org/bugzilla/show_bug.cgi?id=24243 --- Comment #3 from spinpx --- CVE-2019-9077 -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils
[Bug ld/20113] Partial relro support for s390x ld
https://sourceware.org/bugzilla/show_bug.cgi?id=20113 --- Comment #14 from Andreas Krebbel --- Maamoun, was your patch ever posted on the Binutils mailing list? I could not find it there. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bug-binutils@gnu.org https://lists.gnu.org/mailman/listinfo/bug-binutils