[Bug ld/24267] ld discards a symbol with -flto and -static
https://sourceware.org/bugzilla/show_bug.cgi?id=24267 Martin Liška changed: What|Removed |Added CC||eliz at gnu dot org -- 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 Martin Liška changed: What|Removed |Added CC||eliz at gnu dot org -- 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 Frediano Ziglio changed: What|Removed |Added CC||freddy77 at gmail dot com --- Comment #9 from Frediano Ziglio --- (In reply to Martin Liška from comment #8) > (In reply to H.J. Lu from comment #7) > > (In reply to Martin Liška from comment #6) > > > > > > > > Not regression. They are LTO bug fixes. > > > > > > Can you be please more concrete? > > > > Check PR 23958, PR 23818, PR 23309, PR 22983, PR 22751, PR 22502, > > PR 0, PR 21382, PR 18250, PR 20267, PR 20321. > > I would like to mention that I also tested binutils 2.32 and it's affected. > Let me know if you'll need any help with this? I don't understand much the details but I think what H.J. Lu was trying to say is that maybe was fixed for ELF but not for PE/COFF so to have a look at the mentioned PRs. I cannot suggest any of them, PR 0 refers to PREVAILING_DEF_IRONLY but the issue seems the opposite. -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 Matthias Klose changed: What|Removed |Added Target||x86_64-linux-gnu CC||hjl at sourceware dot org -- 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/24276] New: [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 Bug ID: 24276 Summary: [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs Product: binutils Version: 2.31 Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: doko at debian dot org Target Milestone: --- [forwarded from https://bugs.debian.org/923246] seen building pacemaker on x86_64-linux-gnu, on the 2.31 and 2.32 branches. The bug submitter claims that 2.31 20181214 was working ok. ld --eh-frame-hdr -m elf_x86_64 --hash-style=gnu -shared -o libpe_rules.so.26.0.1 crti.o crtbeginS.o -L. libpe_rules_la-rules.o libpe_rules_la-rules_alerts.o libpe_rules_la-common.o --as-needed libcrmcommon.so -lgnutls libplumb.so libpils.so -lqb -lbz2 -lxslt -luuid -lpam -lrt -ldl -lglib-2.0 -lxml2 -z relro -z now -z relro -z now -z defs -soname libpe_rules.so.26 -lgcc --push-state --as-needed -lgcc_s --pop-state -lc -lgcc --push-state --as-needed -lgcc_s --pop-state crtendS.o crtn.o ld: warning: ./libqb.so contains output sections; did you forget -T? Segmentation fault (core dumped) Program received signal SIGSEGV, Segmentation fault. 0x77ee6035 in elf_x86_64_check_relocs (relocs=, sec=, info=, abfd=0x55747370) at ../../bfd/elf64-x86-64.c:1638 1638../../bfd/elf64-x86-64.c: No such file or directory. (gdb) bt #0 0x77ee6035 in elf_x86_64_check_relocs (relocs=, sec=, info=, abfd=0x55747370) at ../../bfd/elf64-x86-64.c:1638 #1 elf_x86_64_check_relocs (abfd=0x55747370, info=, sec=, relocs=) at ../../bfd/elf64-x86-64.c:1797 #2 0x77f098c3 in _bfd_elf_link_check_relocs (abfd=0x55747370, info=0x55709f20) at ../../bfd/elflink.c:3849 #3 0x5557537b in ?? () #4 0x55562426 in ?? () #5 0x77ac209b in __libc_start_main (main=0x55561e00, argc=53, argv=0x7fffe228, init=, fini=, rtld_fini=, stack_end=0x7fffe218) at ../csu/libc-start.c:308 #6 0x55562aca in ?? () gold errors as well: ld.gold: error: ./libqb.so: SECTIONS seen after other input files; try -T/--script ld.gold: internal error in write_sections, at ../../gold/reloc.cc:791 test case at https://people.debian.org/~doko/tmp/binutils-tst.tar.xz -- 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 Nick Clifton changed: What|Removed |Added CC||nickc at redhat dot com --- Comment #1 from Nick Clifton --- Hi Mingi, I am unable to reproduce this bug. :-( Do you have the fix for PR 24235 applied in the sources you are using ? (Commit 179f2db0d9c). 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 Nick Clifton changed: What|Removed |Added CC||nickc at redhat dot com --- Comment #1 from Nick Clifton --- Hi Mingi, I am sorry, but I am unable to reproduce this bug. Are you using the latest binutils sources ? If so, please could you tell me how you configured the toolchain that you are running, and also if you are testing in a 32-bit or 64-bit environment ? 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 ld/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 Nick Clifton changed: What|Removed |Added CC||nickc at redhat dot com --- Comment #1 from Nick Clifton --- Hi Matthias, I cannot reproduce this problem, using either the current mainline sources, the 2.32 branch sources or the 2.31 branch sources, and using both ld.bfd and ld.gold. :-( Is it possible that this is an artefact of the host system ? Ie were the tests being run on a 32-bit host ? 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 #2 from Mingi Cho --- Hi Nick, I used the latest binutils sources, and compiled with following configuration: 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" I was run the program on Ubuntu 16.04 x86_64. Best Regards, Mingi -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 --- Comment #2 from Matthias Klose --- no, I see this on the x86_64 Debian buildds as well, so doesn't seem to be related. -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 H.J. Lu changed: What|Removed |Added CC|hjl at sourceware dot org |hjl.tools at gmail dot 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 H.J. Lu changed: What|Removed |Added Assignee|unassigned at sourceware dot org |hjl.tools at gmail dot com Target Milestone|--- |2.33 -- 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 #10 from Martin Liška --- > I don't understand much the details but I think what H.J. Lu was trying to > say is that maybe was fixed for ELF but not for PE/COFF so to have a look at > the mentioned PRs. > I cannot suggest any of them, PR 0 refers to PREVAILING_DEF_IRONLY but > the issue seems the opposite. I know, I filtered these PRs: PR23958 - elf-related change, but related to symbol versioning PR23818 - likewise PR23309 - changes only in generic code PR22983 - related to dynamic-list only PR22751 - changes only in generic code PR22502 - elf-related change, might by a candidate for COFF PR20321 - a segfault, changes in generic code PR20267 - llvm-related crash PR18250 - likewise PR21382 - elf-related change, might by a candidate for COFF PR0 - elf-related change, might by a candidate for COFF, but's symbol versioning related I'll investigate PR22502 and PR21382 -- 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/24270] dwarf error wrong version in compilation unit header
https://sourceware.org/bugzilla/show_bug.cgi?id=24270 justin at yackoski dot name changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|--- |INVALID --- Comment #5 from justin at yackoski dot name --- apologies, it does seem the uleb128 indicating the DW_AT_location's length was incorrect. Appreciate the help. -- 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/23842] "dwp -e" doesn't consult DW_AT_comp_dir attributes
https://sourceware.org/bugzilla/show_bug.cgi?id=23842 Joe Burzinski changed: What|Removed |Added CC||tridacnid at gmail dot com --- Comment #1 from Joe Burzinski --- I have run into this same behavior and found it frustrating so I'm putting together a small patch to change dwp to first use the relative path as it used to and then construct an absolute path using DW_AT_comp_dir as a prefix and try that second. I'm looking for some guidance regarding a couple things: 1. Maintaining backwards compatibility. 2. Silencing "error: cannot open a.dwo: No such file or directory" until we've determined we also can't find a.dwo in the compile location. 3. Writing tests for this. I see two bash scripts that can be run but I'm not sure I follow what the C++ files named dwp_test_* are doing. As far as item 1 is concerned, I have tried to maintain backwards compatibility by first checking relative path (what dwp used to do) and then falling back to using the location specified by DW_AT_comp_dir to create an absolute path and attempt to open the file at that location instead. Unfortunately, this causes item 2 to be a problem. For the basic test case provided by Mitchell and my own use cases dwp will give an error message for most, if not all, .dwo files that it initially cannot find by searching the relative path. -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 --- Comment #3 from Matthias Klose --- there's a custom linker script in the libqb source $ cat lib/qblog_script.ld.in #include /* GNU ld script This atypical arrangement enforces global visibility of boundary symbols (QB_ATTR_SECTION_START, QB_ATTR_SECTION_STOP) for the custom section QB_ATTR_SECTION used for compile-time offloading of the logging call sites tracking. While libqb relies on these being global, default linker from binutils change the visibility as of version 2.29, making the logging unusable without artificial stimulus: https://bugzilla.redhat.com/1477354 NOTE: If -lqb not usable for linking (e.g. linker not compatible with linker scripts ad-hoc modifying output sections), try recent ld.bfd/binutils linker first when available, otherwise you can try "-l:libqb.so." link switch that bypasses said linker script -- but beware, logging may be less efficient and may lack possible future optimizations and extra features. Consequently, logging issues (typically bound to QB_LOG_INIT_DATA macro) can be mitigated with QB_KILL_ATTRIBUTE_SECTION macro defined for a build. NOTE: When concerned about a warning coming from the build process like warning: [...]libqb.so contains output sections; did you forget -T? while it finishes OK, consider it merely a harmless side-effect. */ SECTIONS { #ifdef QB_HAVE_ATTRIBUTE_SECTION QB_ATTR_SECTION : { QB_ATTR_SECTION_START = .; *(QB_ATTR_SECTION); QB_ATTR_SECTION_STOP = .; } #endif } -- 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] New: pdata section wrong filepos - segmentation fault
https://sourceware.org/bugzilla/show_bug.cgi?id=24278 Bug ID: 24278 Summary: pdata section wrong filepos - segmentation fault Product: binutils Version: 2.32 Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: u6759601 at anu dot edu.au Target Milestone: --- Created attachment 11655 --> https://sourceware.org/bugzilla/attachment.cgi?id=11655&action=edit Example of binary file that triggers the crash, simply run it as objdump -x c01 Hello. I was doing some testing with fuzzing when I realised that the fuzzer was finding some segmentation faults with some entries. I attach one example. I have run it on objdump 2.32. to reproduce it just run objdump -x c01 Doing a little bit of backtracing I found all of the problems reside on the when trying to read the pdata section. The backtrace is as follow: #0 0x55738348 in bfd_getl32 (p=0x82ee3b7c) at libbfd.c:699 #1 0x559761f6 in pex64_get_runtime_function (abfd=0x55bca630, data=0x82ee3b7c, rf=) at pei-x86_64.c:94 #2 pex64_bfd_print_pdata_section (abfd=0x55bca630, vfile=0x77f76760 <_IO_2_1_stdout_>, pdata_section=0x55bcbba0) at pei-x86_64.c:730 #3 0x55991a34 in _bfd_pex64_print_private_bfd_data_common (abfd=0x55bca630, vfile=0x77f76760 <_IO_2_1_stdout_>) at pex64igen.c:2911 #4 0x5596a081 in pe_print_private_bfd_data (abfd=, vfile=) at peicode.h:336 #5 0x555c67d5 in dump_bfd_private_header (abfd=0x55bca630) at ./objdump.c:3782 #6 dump_bfd (abfd=0x55bca630) at ./objdump.c:3782 #7 0x555c8688 in display_object_bfd (abfd=0x55bca630) at ./objdump.c:3883 #8 display_any_bfd (file=0x55bca630, level=0x0) at ./objdump.c:3973 #9 0x555b5ad9 in display_file (last_file=0x1, target=0x0, filename=0x7fffe299 "crashes/c01") at ./objdump.c:3994 #10 display_file (last_file=0x1, target=, filename=0x7fffe299 "crashes/c01") at ./objdump.c:3977 #11 main (argc=, argc@entry=0x3, argv=, argv@entry=0x7fffdef8) at ./objdump.c:4304 #12 0x77dde09b in __libc_start_main (main=0x555b49e0 , argc=0x3, argv=0x7fffdef8, init=, fini=, rtld_fini=, stack_end=0x7fffdee8) at ../csu/libc-start.c:308 #13 0x555b63aa in _start () at ./objdump.c:4083 Taking a closer look at the code it seems like the pdata section is not well mapped as the filepos field of the pdata_section struct doesnt match with the begining byte of the section. Therefore the variables altent and pdata_vam don't make sense so when peforming at line 731 of bfd/pei-x86_64.c: pex64_get_runtime_function (abfd, &arf, &pdata[altent - pdata_vma]); It produces a segmentation fault, I pretty possitive because it goes out of bounds or the value of altent - pdata_vma doesn't make sense. Please keep in mind that the imput is wrong formated as its the result from fuzzing. I am pretty new to all of this so please fell totally free to correct me if I am wrong. I will try to dig deeper trying to find the source of the bug, if anyone could help I would greatly appreciate it -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 --- Comment #4 from H.J. Lu --- [hjl@gnu-cfl-1 pr24276]$ cat x.c int __attribute__((section("my_section"))) a[2] = {0x1234, 0x5678}; extern int __start_my_section; int foo () { int* ap = &__start_my_section; return ap[0]; } [hjl@gnu-cfl-1 pr24276]$ cat z.c int __attribute__((section("my_section"))) a[2] = {0x1234, 0x5678}; extern int __start_my_section; int _start () { int* ap = &__start_my_section; return ap[0]; } [hjl@gnu-cfl-1 pr24276]$ make gcc -fPIC -O2 -c -o z.o z.c gcc -fPIC -O2 -c -o x.o x.c ld -shared -o x.so.1 x.o echo "INPUT(x.so.1)" > x.so echo "SECTIONS {" >> x.so echo " my_section : {" >> x.so echo "__start_my_section = .;" >> x.so echo "*(my_section);" >> x.so echo "__stop_my_section = .;" >> x.so echo "" >> x.so echo " }" >> x.so echo "}" >> x.so ld -shared -o z.so z.o x.so ld: warning: x.so contains output sections; did you forget -T? make: *** [Makefile:14: z.so] Segmentation fault make: *** Deleting file 'z.so' [hjl@gnu-cfl-1 pr24276]$ -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 Ferenc Wágner changed: What|Removed |Added CC||wferi at niif dot hu -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 --- Comment #5 from H.J. Lu --- A patch: https://sourceware.org/ml/binutils/2019-02/msg00130.html -- 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/24276] [2.31/2.32 Regression] segfault in elf_x86_64_check_relocs
https://sourceware.org/bugzilla/show_bug.cgi?id=24276 --- Comment #6 from cvs-commit at gcc dot gnu.org --- The master branch has been updated by H.J. Lu : https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=5cfe428cd1788be52a0af540f02b8f2705354d50 commit 5cfe428cd1788be52a0af540f02b8f2705354d50 Author: H.J. Lu Date: Wed Feb 27 11:53:16 2019 -0800 x86-64: Skip protected check on symbol defined by linker Skip symbol defined by linker when checking copy reloc on protected symbol. bfd/ PR ld/24276 * elf64-x86-64.c (elf_x86_64_check_relocs): Skip symbol defined by linker when checking copy reloc on protected symbol. ld/ PR ld/24276 * testsuite/ld-i386/i386.exp: Run PR ld/24276 test. * testsuite/ld-x86-64/x86-64.exp: Likewise. * testsuite/ld-i386/pr24276.dso: New file. * testsuite/ld-i386/pr24276.warn: Likewise. * testsuite/ld-x86-64/pr24276.dso: Likewise. * testsuite/ld-x86-64/pr24276.warn: Likewise. -- 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] New: ARMv8.5 extension incorrectly named "predres" instead of "predinv"
https://sourceware.org/bugzilla/show_bug.cgi?id=24279 Bug ID: 24279 Summary: ARMv8.5 extension incorrectly named "predres" instead of "predinv" Product: binutils Version: 2.33 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: rth at gcc dot gnu.org Target Milestone: --- commit dad0c3bfb5e32ff3f2a03830dc189fe207c7ae00 Author: Sudakshina Das Date: Fri Oct 5 10:51:22 2018 +0100 [Arm, 3/3] Add Execution and Data Prediction instructions for AArch32 This patch is part of the patch series to add support for ARMv8.5-A extensions. (https://developer.arm.com/products/architecture/cpu-architecture/a-profile/ exploration-tools) This patch adds the Execution and Data Prediction Restriction instructions (that is, cfprctx, dvprxtc, cpprctx). These are all aliases to MCR and are disassembled as such. This instruction is retrospectively made optional for all versions of the architecture from ARMv8.0 to ARMv8.4 and is mandatory from ARMv8.5. Hence adding a new +predres for older versions of the architecture. - The official name of the extension is v8.0-PredInv. (You can see this used in the xml descriptions for the new insns, eg: https://developer.arm.com/docs/ddi0595/b/aarch64-system-instructions/cfp-rctx ) -- 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 Target||aarch64-* CC||sudi at gcc dot gnu.org --- Comment #1 from Richard Henderson --- I can only presume that this has been renamed from "restriction" to "invalidation" at some later version of the spec than when it was implemented for binutils last October. I received push-back on matching the "predres" naming within qemu, and I think we should be consistent across the development environment while this is still brand new. -- 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