[Bug binutils/19005] objcopy buffer-over-read
https://sourceware.org/bugzilla/show_bug.cgi?id=19005 --- Comment #15 from Andrew Stubbs --- It's just because the padding is added to the output section size when --gap-fill is set in the following snippet: objcopy.c, copy_object() size = bfd_section_size (obfd, osections[i]); gap_start = bfd_section_lma (obfd, osections[i]) + size; gap_stop = bfd_section_lma (obfd, osections[i + 1]); if (gap_start < gap_stop) { if (! bfd_set_section_size (obfd, osections[i], size + (gap_stop - gap_start))) The u-boot build system is doing this: arm-none-linux-gnueabi-objcopy -j .text -j .secure_text -j .rodata -j .hash -j .data -j .got.plt -j .u_boot_list -j .rel.dyn --gap-fill=0xff -O binary u-boot u-boot.bin -- 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/19014] New: Typo in manpage of ld(1)
https://sourceware.org/bugzilla/show_bug.cgi?id=19014 Bug ID: 19014 Summary: Typo in manpage of ld(1) Product: binutils Version: 2.26 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: winter-...@bfw-online.de Target Milestone: --- Created attachment 8642 --> https://sourceware.org/bugzilla/attachment.cgi?id=8642&action=edit Git diff from Debian source repository to fix typo https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=ld/ld.texinfo;h=90194beabf8c57ebb1dd082b3e99af1e00c91001;hb=HEAD#l2812 "each tiem" -> "each time" -- 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 admin/18997] Please enable AS and LD in configure.ac for OS X
https://sourceware.org/bugzilla/show_bug.cgi?id=18997 --- Comment #3 from gingold at adacore dot com --- > On 27 Sep 2015, at 00:54, noloader at gmail dot com > wrote: > > https://sourceware.org/bugzilla/show_bug.cgi?id=18997 > > --- Comment #2 from Jeffrey Walton --- > (In reply to ging...@adacore.com from comment #1) >> as and ld haven't been ported to mac os x (as native tools). >> Not sure wether it is worth given there are already open source (but >> non-free) tools. > > I believe AS is a required tool in the suite because of the way inline > assembly > is handled by the compiler. LD is probably going to be a stretch (but I'm only > guessing). Ok, I think you are asking for the support of .intel_syntax. > > To ensure I'm not missing something obvious, what other non-free tools did you > have in mind, and how would they be used? Is it a non-free compiler that can > consume the inline assembly? Or is it a different assembler that GCC can use > when processing the inline assembly? The sources of apple assembler, based on a very old version of gas are available from opensource.apple.com. But it is deprecated. Xcode is now based on clang, which has its own assembler. Likewise for the linker. -- 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/19008] symbol references from notes sections result in errors with -gc-sections
https://sourceware.org/bugzilla/show_bug.cgi?id=19008 --- Comment #10 from H.J. Lu --- (In reply to Andi Kleen from comment #7) > binutils mainline can't build gcc > > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (3168) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (2884) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (1858) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (2688) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (2379) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (3136) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (3310) > /usr/local/bin/ld-plugin: _muldi3_s.o: access beyond end of merged section > (1947) > /usr/local/bin/ld-plugin: _muldi3_s.o(.debug_info+0x53c): reloc against > `.debug_str': error 2 > > > Lots of these messages Please send me all input files to reproduce this linker error. -- 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/19005] objcopy buffer-over-read
https://sourceware.org/bugzilla/show_bug.cgi?id=19005 --- Comment #17 from Andrew Stubbs --- I can check this tomorrow, but I don't think the output size is actually broken, as long as everything respects the input size when reading from input sections. The "change something, change it back, change it again" business seems a bit clumsy. That said, it looks like it will fix the bug. Incidentally, you clearly don't like something about my patch, but you've not said what? -- 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/19013] Section corrupted with elf64-x86-64 input -> elf32-i386 output
https://sourceware.org/bugzilla/show_bug.cgi?id=19013 H.J. Lu changed: What|Removed |Added Status|NEW |WAITING --- Comment #1 from H.J. Lu --- You can't use ld --oformat elf32-i386 to generate ELF/i386 output from ELF/x86-64 input since they have different ELF file classes. Please checkout Linux/x86-64 kernel to see how it mixes i386 codes with x86-64 codes. -- 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/19005] objcopy buffer-over-read
https://sourceware.org/bugzilla/show_bug.cgi?id=19005 H.J. Lu changed: What|Removed |Added Attachment #8634|0 |1 is obsolete|| --- Comment #16 from H.J. Lu --- Created attachment 8643 --> https://sourceware.org/bugzilla/attachment.cgi?id=8643&action=edit A new patch Please try this patch. -- 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/19013] Section corrupted with elf64-x86-64 input -> elf32-i386 output
https://sourceware.org/bugzilla/show_bug.cgi?id=19013 H.J. Lu changed: What|Removed |Added CC||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 binutils/19005] objcopy buffer-over-read
https://sourceware.org/bugzilla/show_bug.cgi?id=19005 --- Comment #18 from H.J. Lu --- (In reply to Andrew Stubbs from comment #17) > I can check this tomorrow, but I don't think the output size is actually > broken, as long as everything respects the input size when reading from > input sections. The "change something, change it back, change it again" > business seems a bit clumsy. > > That said, it looks like it will fix the bug. > > Incidentally, you clearly don't like something about my patch, but you've > not said what? copy_object adds gap fills behind the back of bfd. I'd like to separate bfd_convert_section_contents from copy_section so that there aren't surprises in bfd. When copy_object does /* This has to happen after the symbol table has been set. */ bfd_map_over_sections (ibfd, copy_section, obfd); it should only copy bfd_section_size (obfd, osections[i]) - gaps[i], not lying to bfd. -- 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/19013] Section corrupted with elf64-x86-64 input -> elf32-i386 output
https://sourceware.org/bugzilla/show_bug.cgi?id=19013 --- Comment #2 from Antoine Kaufmann --- I worked around the issue for me, but still the behavior seems strange. And if I have ld generate the 64 bit elf and then use objcopy to generate elf32-i386 the section contents also look fine, and everything seems to work as expected. As I see this, either this is a bug where ld just does not handle this weird case correctly, or for some reason I don't currently understand ld can't actually do this right. So if it is a bug it sounds like something that should probably be fixed, or if it can't or want be fixed at least some error message should show up instead of silently truncating sections. But yes this is clearly not a high priority issue. -- 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