[Bug binutils/32459] objdump -R: dump SHT_RELR relocations?

2025-02-23 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32459 --- Comment #4 from Fangrui Song --- Sorry again for the late reply. Since objdump -r ignores dynamic relocations, I think it is consistent to not report a warning when .relr.dyn is present. % objdump -r /bin/ls /bin/ls: file format elf

[Bug ld/32720] New: ld: add --why-live

2025-02-18 Thread i at maskray dot me
: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Apple ld64 implements -why_live sym > Logs a chain of references to symbol_name. Only applicable with -dead_strip . > It can help debug why something that you think should be dead strip removed

[Bug ld/32591] undue GOTPCREL relaxation attempts

2025-01-26 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32591 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #4

[Bug binutils/32459] objdump -R: dump SHT_RELR relocations?

2024-12-30 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32459 --- Comment #2 from Fangrui Song --- Hi Nick, Sorry for my late reply and happy new year! I favor 1) for its simplicity. I do think it's tricky to share code between readelf (no BFD dependency) and objdump. It's probably good enough to encou

[Bug binutils/32459] New: objdump -R: dump SHT_RELR relocations?

2024-12-13 Thread i at maskray dot me
: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- readelf -r dumps RELR relocations while objdump -R doesn't. Should objdump -R dump RELR as well? % readelf -W -r a Relocation section '.rela.dyn' at offset 0

[Bug ld/27566] [RISC-V] relocation truncated to fit: R_RISCV_GPREL_I against aymbol

2024-10-24 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=27566 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #11

[Bug ld/32153] [2.43 regression]: ld: Failed to link llvm bitcode module: Expected at most one ThinLTO module per bitcode file

2024-09-08 Thread a.horodniceanu at proton dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32153 Andrei Horodniceanu changed: What|Removed |Added CC||hjl.tools at gmail dot com --

[Bug ld/32153] New: [2.43 regression]: ld: Failed to link llvm bitcode module: Expected at most one ThinLTO module per bitcode file

2024-09-08 Thread a.horodniceanu at proton dot me
Version: 2.43.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: a.horodniceanu at proton dot me Target Milestone: --- Since commit a6f8fe0a9e9cbe871652e46ba7c22d5e9fb86208

[Bug gas/32073] [2.44 Regression] gas failed to build x86-64 Linux kernel

2024-08-14 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32073 --- Comment #26 from Fangrui Song --- (In reply to Andreas Schwab from comment #25) > https://inbox.sourceware.org/binutils/87a5hjmq7r@linux-m68k.org/ Thanks. https://inbox.sourceware.org/binutils/73460160-a0bf-48d9-84b0-c531317d0...@suse

[Bug gas/32082] gas arm aarch64: missing mapping symbols $d in the absence of alignment directives

2024-08-13 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32082 Fangrui Song changed: What|Removed |Added Target||arm*-*-* aarch64-*-* -- You are recei

[Bug gas/32082] New: gas arm aarch64: missing mapping symbols $d in the absence of alignment directives

2024-08-13 Thread i at maskray dot me
Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Data sections without alignment directives (excluding BSS) might lack '$d' symbols, and mixing data and tex

[Bug gas/32073] [2.44 Regression] gas failed to build x86-64 Linux kernel

2024-08-13 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32073 --- Comment #24 from Fangrui Song --- (In reply to H.J. Lu from comment #6) > It also breaks GCC builds for ARM, AVR, PRU and others. Do you have links to the potentially brittle assembly? In the gcc repo, I checked a few `rg '\.macro' -g '*

[Bug gas/32073] [2.44 Regression] gas failed to build x86-64 Linux kernel

2024-08-13 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=32073 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #23

[Bug gas/31955] gas: Extend .loc directive to emit a label

2024-07-19 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31955 Fangrui Song changed: What|Removed |Added CC||jbeulich at suse dot com -- You are r

[Bug binutils/31924] aarch64 kernels built with binutils 2.42.50.20240618 and later fail to boot

2024-07-14 Thread tj.iam.tj at proton dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31924 --- Comment #14 from Tj --- I see a patch was published in the mailing list on July 2nd but so far it has not been committed - is there something holding it up? https://sourceware.org/pipermail/binutils/2024-July/135334.html -- You are rece

[Bug gas/31955] gas: Extend .loc directive to emit a label

2024-07-08 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31955 --- Comment #1 from Fangrui Song --- Perhaps call this .loc_label , since .cfi_label (2015) is available. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug gas/31955] New: gas: Extend .loc directive to emit a label

2024-07-04 Thread i at maskray dot me
: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- I have noticed that Meta Platforms folks have a proposal to extend the .loc directive https://discourse.llvm.org/t/rfc-extending-llvm-mc-loc-directive-with-labeling-support

[Bug binutils/31924] aarch64 kernels built with binutils 2.42.50.20240618 and later fail to boot

2024-06-28 Thread tj.iam.tj at proton dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31924 --- Comment #10 from Tj --- On Friday, 28 June 2024 at 13:52, nsz at gcc dot gnu.org wrote: > > so either linux is wrong for passing > > --no-apply-dynamic-relocs -z pack-relative-relocs > > together or ld should ignore --no-apply-dynamic

[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-06-28 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31904 --- Comment #10 from Harmen Stoppels --- Ah OK, I thought add_input_library() was immediate. Thanks for the patch! Sounds like this is easier to implement correctly and more convenient to use as a builtin feature. I could bring that up in a

[Bug binutils/31924] aarch64 kernels built with binutils 2.42.50.20240618 and later fail to boot

2024-06-27 Thread tj.iam.tj at proton dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31924 Tj changed: What|Removed |Added CC||tj.iam.tj at proton dot me --- Comment #8 from

[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-06-26 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31904 --- Comment #8 from Harmen Stoppels --- Hi Nick, I appreciate the patch. Would an additional `ld_plugin_remove_extra_library_path(const char *path)` be possible so that > This does however present a problem if multiple archives with > @samp

[Bug ld/31688] ld: Add CLASS to allow separate section matching and referring

2024-06-25 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31688 --- Comment #2 from Fangrui Song --- lld/ELF plans to add CLASS: https://github.com/llvm/llvm-project/pull/95323 -- You are receiving this mail because: You are on the CC list for the bug.

[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-06-25 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31904 --- Comment #4 from Harmen Stoppels --- > fixing the bfd linker's not-having-local-search-paths issue, which I think > might be hard to do Technically it's not very hard: at least in ld.bfd search paths are a linked list, so it forms a stack

[Bug ld/31906] libdep.so plugin escaping with `\` has bugs, can segfault

2024-06-25 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31906 --- Comment #6 from Harmen Stoppels --- Thanks Nick, looks good to me. Harmen -- You are receiving this mail because: You are on the CC list for the bug.

[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-06-21 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31904 --- Comment #2 from Harmen Stoppels --- Hi Nick, > The problem is that there is a libg.a in the standard library search paths > and this is being picked up instead of your local libg.a. I realized that, changed the title of the bug report,

[Bug ld/31906] libdep.so plugin escaping with `\` has bugs, can segfault

2024-06-21 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31906 --- Comment #3 from Harmen Stoppels --- Hi Nick, you're right. But there are larger issues, such as the fact that `\` isn't escaping anything, it's a "skipped character". I submitted a patch that addresses the issues reported here as well as

[Bug ld/31904] libdep.so plugin registers search path after default paths in bfd linker

2024-06-20 Thread me at harmenstoppels dot nl
https://sourceware.org/bugzilla/show_bug.cgi?id=31904 Harmen Stoppels changed: What|Removed |Added Summary|libdep.so plugin does not |libdep.so plugin registers

[Bug ld/31906] New: libdep.so plugin escaping with `\` has bugs, can segfault

2024-06-18 Thread me at harmenstoppels dot nl
Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: me at harmenstoppels dot nl Target Milestone: --- The `libdep.so` plugin allows putting dependency metadata as further command line arguments `-L/foo -lbar` for the linker in the

[Bug ld/31904] New: libdep.so plugin does not register search path in bfd linker

2024-06-18 Thread me at harmenstoppels dot nl
Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: me at harmenstoppels dot nl Target Milestone: --- I've created two static libraries `f/libf.a` and `g/libg.a`. The first registers a dependency on the second: `-L/path/to/

[Bug binutils/31884] New: Compressed .strtab and .symtab

2024-06-11 Thread i at maskray dot me
Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- In ELF executables and DSOs, .symtab and .strtab sections can consume a significant portion of the file size (10+% or even 20+%). In many scenarios, we cannot remove them due to

[Bug ld/28812] ld: Make --compress-debug-sections=zlib parallel

2024-06-11 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=28812 --- Comment #2 from Fangrui Song --- This is a feature request. Compressing debug sections is slow. Parallelism, even with zstd, is pretty important. -- You are receiving this mail because: You are on the CC list for the bug.

[Bug ld/20520] ld terminated with signal 11 [Segmentation fault]

2024-06-05 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=20520 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #3

[Bug ld/31795] ld.bfd makes ELFs of type ET_EXEC for static PIEs when load address is non-0

2024-05-28 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31795 --- Comment #65 from Fangrui Song --- > > Changing ET_DYN to ET_EXEC fulfills the address requirement but disables > > ASLR. > > Is it intentional? > > That's my understanding of reading the -Ttext-segment documentation. The > question is w

[Bug ld/31795] ld.bfd makes ELFs of type ET_EXEC for static PIEs when load address is non-0

2024-05-26 Thread i at maskray dot me
||i at maskray dot me Resolution|FIXED |--- --- Comment #37 from Fangrui Song --- I agree with mintsuki . The "-pie -Ttext-segment=non-zero => ET_EXEC" hack should not be needed. >From https://sourceware.org/pipermail/binutils/2013

[Bug gas/31752] gas: Support \+ in .rept/.irp/.irpc directives

2024-05-17 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31752 --- Comment #1 from Fangrui Song --- In the absence of the feature, there are a few ways, but none achieves great efficiency or convenience. For example, we can define a macro that expands to a sequence of strings: 0, (0+1), ((0+1)+1), (((0+1

[Bug gas/31752] gas: Support \+ in .rept/.irp/.irpc directives

2024-05-17 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31752 Fangrui Song changed: What|Removed |Added CC||jbeulich at suse dot com -- You are r

[Bug gas/31752] New: gas: Support \+ in .rept/.irp/.irpc directives

2024-05-17 Thread i at maskray dot me
Component: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- (https://sourceware.org/pipermail/binutils/2024-May/134009.html RFC: Maintaining a per-macro invocation count) gas recently introduced \+ for per-macro invocation counts

[Bug ld/31688] ld: Add CLASS to allow separate section matching and referring

2024-04-30 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31688 --- Comment #1 from Fangrui Song --- We can shorten SECTION_CLASS to CLASS as suggested by https://inbox.sourceware.org/binutils/CAEdiOyfVYNt8Sq+GGixNek-XMPZaOccx+YSd7QO7eeZy=en...@mail.gmail.com/ -- You are receiving this mail because: You

[Bug ld/31688] ld: Add CLASS to allow separate section matching and referring

2024-04-30 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31688 Fangrui Song changed: What|Removed |Added Summary|ld: Add SECTION_CLASS to|ld: Add CLASS to allow

[Bug ld/31688] New: ld: Add SECTION_CLASS to allow separate section matching and referring

2024-04-30 Thread i at maskray dot me
: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- An input section description file_pattern(section_pattern) couples two operations: * "defining": match a subset of sec

[Bug ld/27452] ld: Support compressing arbitrary sections (generalized --compress-debug-sections=)

2024-04-30 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=27452 --- Comment #3 from Fangrui Song --- The actual form I plan to use in lld is: --compress-sections ={none,zlib,zstd}[:level] zstd excels at scaling from low-ratio-very-fast to high-ratio-pretty-slow. Some users prioritize speed and prefer dis

[Bug gas/31567] New: gas/ld: Implicit addends for non-code sections

2024-03-28 Thread i at maskray dot me
Component: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- ELF defines two relocation formats, REL and RELA. REL uses implicit addends, saving space compared to RELA's explicit addend field. However, REL is often inadequat

[Bug binutils/31475] binutils: Support CREL relocation format

2024-03-22 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31475 --- Comment #1 from Fangrui Song --- The format was tentatively named RELLEB. As I refine the original pure LEB-based format, “RELLEB” might not be the most fitting name. I have switched to SHT_CREL/DT_CREL/.crel and updated https://maskray.m

[Bug binutils/31475] binutils: Support CREL relocation format

2024-03-22 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31475 Fangrui Song changed: What|Removed |Added Summary|binutils: Support RELLEB|binutils: Support CREL

[Bug binutils/31475] New: binutils: Support RELLEB relocation format

2024-03-11 Thread i at maskray dot me
: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- The relocation formats REL and RELA for ELF are inefficient. In a release build of Clang for x86-64, .rela.* sections consume a significant portion (approximately 20.9%) of

[Bug ld/27452] ld: Support compressing arbitrary sections (generalized --compress-debug-sections=)

2024-03-11 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=27452 --- Comment #2 from Fangrui Song --- I find it very difficult to handle SHF_ALLOC sections due to data commands, range extension thunks, and other features requiring fixed-point iteration. Compressing non-SHF_ALLOC sections alone may yield a

[Bug ld/31409] ld arm: global/weak non-hidden symbols referenced by R_ARM_FUNCDESC are unnecessarily exported

2024-02-23 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31409 --- Comment #1 from Fangrui Song --- bfd/elf32-arm.c:16521 if (eh->fdpic_cnts.funcdesc_cnt > 0) { if (htab->root.dynamic_sections_created && h->dynindx == -1 && !h->forced_local) if (! bfd_elf_link_record_dynamic

[Bug ld/31409] ld arm: global/weak non-hidden symbols referenced by R_ARM_FUNCDESC are unnecessarily exported

2024-02-23 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31409 Fangrui Song changed: What|Removed |Added CC||clyon at gcc dot gnu.org -- You are r

[Bug ld/31409] New: ld arm: global/weak non-hidden symbols referenced by R_ARM_FUNCDESC are unnecessarily exported

2024-02-23 Thread i at maskray dot me
: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- % cat a.s .globl _start, f0, f1 .weak f2 .protected f1 _start: f0: f1: f2: fl: bx lr .data .long f0

[Bug ld/31408] New: ld arm: fdpic link segfaults on R_ARM_GOTOFFFUNCDESC referencing a hidden symbol

2024-02-23 Thread i at maskray dot me
Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- % cat a.c __attribute__((visibility("hidden"))) void fun_hidden(); void *fun_hidden_addr() { return

[Bug ld/31408] ld arm: fdpic link segfaults on R_ARM_GOTOFFFUNCDESC referencing a hidden symbol

2024-02-23 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31408 Fangrui Song changed: What|Removed |Added CC||clyon at gcc dot gnu.org T

[Bug ld/31407] ld arm: fdpic link may have null pointer dereference in allocate_dynrelocs_for_symbol

2024-02-23 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31407 Fangrui Song changed: What|Removed |Added Target||arm*-*-uclinuxfdpiceabi

[Bug ld/31407] New: ld arm: fdpic link may have null pointer dereference in allocate_dynrelocs_for_symbol

2024-02-23 Thread i at maskray dot me
Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Noticed while investigating the behavior of .rofixup % cat a.s .globl foo foo: bx lr .data .long foo % ./bin

[Bug binutils/31000] objcopy: add support for changing ELF symbol visibility

2024-02-21 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31000 --- Comment #2 from Fangrui Song --- (In reply to Fangrui Song from comment #1) > On the llvm-objcopy side, someone proposes --set-symbol-visibility: > https://github.com/llvm/llvm-project/pull/80872 The proposal looks like: .. option:: --se

[Bug gas/30788] gas aarch64: GOT relocations referencing a local symbol should not be changed to reference STT_SECTION

2024-02-20 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30788 Fangrui Song changed: What|Removed |Added CC||nsz at gcc dot gnu.org -- You are rec

[Bug binutils/31000] objcopy: add support for changing ELF symbol visibility

2024-02-08 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31000 --- Comment #1 from Fangrui Song --- On the llvm-objcopy side, someone proposes --set-symbol-visibility: https://github.com/llvm/llvm-project/pull/80872 -- You are receiving this mail because: You are on the CC list for the bug.

[Bug binutils/31250] Stripping Rust static libraries fails because of overly zealous illegal path check

2024-01-26 Thread amy at amyspark dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31250 --- Comment #8 from Amyspark --- (In reply to Nick Clifton from comment #6) > > Actually that is a very interesting point. Does MSVC require that the path > inside the lib point to an object that already exists or one that could > exist, sho

[Bug binutils/31250] Stripping Rust static libraries fails because of overly zealous illegal path check

2024-01-25 Thread amy at amyspark dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31250 --- Comment #5 from Amyspark --- > Is the library really valid if it contains absolute pathnames ? Yes, all that MSVC cares about is a) the symbol b) the path inside the .lib pointing to an existing object. I was able to extract all of them

[Bug binutils/31250] Stripping Rust static libraries fails because of overly zealous illegal path check

2024-01-25 Thread amy at amyspark dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31250 --- Comment #4 from Amyspark --- Applied the patch on top of mingw-w64-binutils (commit c2aee7d89488d9402315d59d25852dff258c9eba), and can confirm it works as expected. Only nit I could propose is to keep track of those files that have been b

[Bug binutils/31292] New: objcopy: add --prefix-symbols-remove

2024-01-25 Thread i at maskray dot me
: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- objcopy supports --prefix-symbols to prefix all symbols. Perhaps --prefix-symbols-remove= can be added to remove the prefix. For example, cat > a.s <https://github.co

[Bug binutils/31250] Stripping Rust static libraries fails because of overly zealous illegal path check

2024-01-16 Thread amy at amyspark dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31250 --- Comment #1 from Amyspark --- 7z compressed file of gstrswebrtc.lib: https://s3.amyspark.me/temp/gstrswebrtc.7z SHA256: de8d45f9a67b500c9f237375efca3593c2c301a7266b1ffd21b523dc35fc4b88 -- You are receiving this mail because: You are on t

[Bug binutils/31250] New: Stripping Rust static libraries fails because of overly zealous illegal path check

2024-01-16 Thread amy at amyspark dot me
Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: amy at amyspark dot me Target Milestone: --- Created attachment 15307 --> https://sourceware.org/bugzilla/attachment.cgi?id=15307&action=edit

[Bug ld/31158] ld: Should --gc-sections respect RHS of a symbol assignment?

2023-12-14 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31158 --- Comment #2 from Fangrui Song --- Interesting. BFD's behavior depends on whether the assigned symbol is referenced. Let's enhance the test. cat > a.s < a.t as a.s -o a.o ld.lld --gc-sections a.o a.t -o a.lld ld.bfd --gc-sections a.o a.t -o

[Bug ld/31158] New: ld: Should --gc-sections respect RHS of a symbol assignment?

2023-12-12 Thread i at maskray dot me
Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- cat > a.s < a.t echo 'PROVIDE(x = bar);' > b.t # not used, but worth testing as a.s -o a.o ld.lld --gc-sections a.o

[Bug gas/27215] as: Error: non-constant .uleb128 is not supported on riscv64

2023-11-30 Thread i at maskray dot me
||i at maskray dot me Target Milestone|--- |2.41 Status|UNCONFIRMED |RESOLVED --- Comment #8 from Fangrui Song --- Implemented by https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h

[Bug binutils/31077] objcopy has non-deterministic output

2023-11-20 Thread yannik at sembritzki dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31077 Yannik Sembritzki changed: What|Removed |Added Resolution|--- |WORKSFORME Status|UNC

[Bug binutils/31077] objcopy has non-deterministic output

2023-11-20 Thread yannik at sembritzki dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31077 --- Comment #3 from Yannik Sembritzki --- Reading `man ar`, I now finally understand what `archive` means in this context. I didn't quite get that before, and thought it described the "archive" of sections contained within the object file. Oop

[Bug binutils/31077] objcopy has non-deterministic output

2023-11-20 Thread yannik at sembritzki dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31077 Yannik Sembritzki changed: What|Removed |Added Summary|objcopy |objcopy has |--

[Bug binutils/31077] objcopy --enable-deterministic-archives has non-deterministic output

2023-11-20 Thread yannik at sembritzki dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=31077 --- Comment #1 from Yannik Sembritzki --- This is most likely caused by some timestamp, as using /usr/bin/faketime '2020-01-01' objcopy results in a deterministic build. -- You are receiving this mail because: You are on the CC list for t

[Bug binutils/31077] New: objcopy --enable-deterministic-archives has non-deterministic output

2023-11-19 Thread yannik at sembritzki dot me
: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: yannik at sembritzki dot me Target Milestone: --- I am building a unified kernel image using objcopy. As this file is part of the PCR event log which is used for

[Bug ld/30865] ld: =fillexp different behaviors for hexidecimal literal

2023-11-05 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30865 --- Comment #5 from Fangrui Song --- (In reply to Nick Clifton from comment #4) > Created attachment 15115 [details] > Proposed patch Sorry for the late reply but the documentation and test change looks great! There is a minor typo below >

[Bug binutils/31000] New: objcopy: add support for changing ELF symbol visibility

2023-10-25 Thread i at maskray dot me
Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Recently I have been dealing with a benign multiple definition related to compiler-rt/lib/builtins and rust-lang/compiler-builtins. I need

[Bug ld/30907] ELF segment add extra 2 LOAD segments in aarch64, making binary bigger 128KiB than before

2023-10-08 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30907 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #4

[Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type

2023-09-19 Thread i at maskray dot me
ed conversion can all be described by existing relocation types, which is nice. However, I do not know whether the property will hold for all current and future RISC-V relaxation schemes. When investigating relocation overflow pressure for x86-64 small code model, I have found that preserving the origina

[Bug ld/30865] New: ld: =fillexp different behaviors for hexidecimal literal

2023-09-17 Thread i at maskray dot me
Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- https://sourceware.org/binutils/docs/ld/Output-Section-Fill.html https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h

[Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type

2023-09-12 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30844 --- Comment #2 from Fangrui Song --- (In reply to Palmer Dabbelt from comment #1) > Nelson and I are just chatting about this. It's not intentional, but we > also don't quite know what the right answer is here: there's some relocs we > can to

[Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type

2023-09-12 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30844 Fangrui Song changed: What|Removed |Added CC||jnoorman at igalia dot com -- You are

[Bug ld/30844] ld riscv: --emit-relocs does not retain the original relocation type

2023-09-12 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30844 Fangrui Song changed: What|Removed |Added CC||jrtc27 at jrtc27 dot com,

[Bug ld/30844] New: ld riscv: --emit-relocs does not retain the original relocation type

2023-09-12 Thread i at maskray dot me
: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- From https://maskray.me/blog/2021-03-14-the-dark-side-of-riscv-linker-relaxation#ld---emit-relocs (with updated instructions) For

[Bug ld/30612] maxpagesize alignment after relro segment takes up space

2023-08-29 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30612 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #1

[Bug gas/30788] gas aarch64: GOT relocations referencing a local symbol should not be changed to reference STT_SECTION

2023-08-22 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30788 Fangrui Song changed: What|Removed |Added Target||aarch64*-* -- You are receiving this

[Bug gas/30788] New: gas aarch64: GOT relocations referencing a local symbol should not be changed to reference STT_SECTION

2023-08-22 Thread i at maskray dot me
Status: NEW Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Extracted from https://github.com/llvm/llvm-project/issues/63418 ``` cat > a.s <

[Bug binutils/30684] readelf -s: support an option to display section names

2023-07-27 Thread i at maskray dot me
viour needed to be gated > by a command line option, so I have added --extra-sym-info to do this. Thank you for implementing this! Yes, I think quite a few projects rely on the output of readelf -Ws. Using an opt-in option is necessary. The option name -X/--extra-sym-info looks good to me. Ano

[Bug binutils/30684] New: readelf -s: support an option to display section names

2023-07-25 Thread i at maskray dot me
Component: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- I almost always prefer readelf -Ws to objdump -t for ELF symbol information as the former presents all information without distortion. Certain symbol types have

[Bug binutils/30592] objcopy --set-section-flags: support "large" for SHF_X86_64_LARGE

2023-07-09 Thread i at maskray dot me
|unassigned at sourceware dot org |i at maskray dot me Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #2 from Fangrui Song --- https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5e24da908dbf6ddeb03e2b194f6b39dea3c660f3

[Bug binutils/30623] New: objcopy --set-section-flags: support toggling a flag

2023-07-07 Thread i at maskray dot me
Component: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- It will be more convenient if --set-section-flags supports toggling a flag, instead of specifying the full set of flags, e.g. --set-section-flags .foo=-alloc

[Bug ld/30374] ld: Add --remap-inputs-file= to remap input files

2023-06-29 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30374 --- Comment #5 from Fangrui Song --- (In reply to Nick Clifton from comment #4) > OK, I have decided to commit my patch now, so that it gets into the next > release. If there are problems we can always reopen this PR. Thank you! I have tested

[Bug binutils/30592] objcopy --set-section-flags: support "large" for SHF_X86_64_LARGE

2023-06-27 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30592 --- Comment #1 from Fangrui Song --- Patch: https://sourceware.org/pipermail/binutils/2023-June/128052.html -- You are receiving this mail because: You are on the CC list for the bug.

[Bug binutils/30592] New: objcopy --set-section-flags: support "large" for SHF_X86_64_LARGE

2023-06-27 Thread i at maskray dot me
ty: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Linkers may place SHF_X86_64_LARGE sections away from regular sections to alleviate relocation overflow pressure [1]. I

[Bug ld/27452] ld: Support compressing arbitrary sections (generalized --compress-debug-sections=)

2023-06-26 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=27452 --- Comment #1 from Fangrui Song --- I think we should just allow SHF_ALLOC | SHF_COMPRESSED sections. Created https://groups.google.com/g/generic-abi/c/HUVhliUrTG0 The proposed option syntax is: --compress-sections='.debug_*=zlib' . This app

[Bug binutils/16523] support xz compression of debug info files

2023-06-26 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=16523 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #1

[Bug binutils/30237] strip fails on riscv with 'not enough room for program headers, stgnjAlO[.interp]: bad value'

2023-06-03 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30237 --- Comment #7 from Fangrui Song --- (In reply to Andreas Schwab from comment #6) > Since arm32 does not have PT_ARM_ATTRIBUTES it cannot have this problem in > the first place. With the PHDRS linker script command, we can customize program h

[Bug binutils/30237] strip fails on riscv with 'not enough room for program headers, stgnjAlO[.interp]: bad value'

2023-06-03 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30237 Fangrui Song changed: What|Removed |Added CC||i at maskray dot me --- Comment #5

[Bug gas/30449] gas riscv: support pseudo-instruction "lga"

2023-05-15 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30449 Fangrui Song changed: What|Removed |Added Target||riscv*-*-* -- You are receiving this

[Bug gas/30449] New: gas riscv: support pseudo-instruction "lga"

2023-05-15 Thread i at maskray dot me
Component: gas Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- "lga" has been in riscv-asm-manual since the resolution to https://github.com/riscv-non-isa/riscv-asm-manual/issues/50 In LLVM 17, LLVM integrated assembl

[Bug binutils/30426] gas x86: reject {call,jmp} [offset func] in Intel syntax

2023-05-06 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30426 Fangrui Song changed: What|Removed |Added Target||i686* x86_64* -- You are receiving th

[Bug binutils/30426] New: gas x86: reject {call,jmp} [offset func] in Intel syntax

2023-05-06 Thread i at maskray dot me
Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- % cat a.s call [offset func] jmp [offset func] % as -msyntax=intel a.s -o a.o % objdump -M intel -dr a.o a.o: file format elf64-x86

[Bug ld/30374] ld: Add --remap-inputs-file= to remap input files

2023-04-24 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=30374 --- Comment #1 from Fangrui Song --- I have picked `=` as a separator a la -fdebug-prefix-map=. --remap-inputs= may be handy to specify just one pattern. Here is an example: --remap-inputs-file=1.map --remap-inputs-file=2.map --remap-inputs='

[Bug ld/30374] New: ld: Add --remap-inputs-file= to remap input files

2023-04-20 Thread i at maskray dot me
Component: ld Assignee: unassigned at sourceware dot org Reporter: i at maskray dot me Target Milestone: --- Hello! I'm considering an option in ld.lld to replace or remove input files with glob patterns. https://reviews.llvm.org/D148859 --remap-inputs-file= can be spec

[Bug ld/27565] ld: Support input section description keyword: REVERSE

2023-03-24 Thread i at maskray dot me
https://sourceware.org/bugzilla/show_bug.cgi?id=27565 --- Comment #3 from Fangrui Song --- (In reply to Nick Clifton from comment #2) > Created attachment 14772 [details] > Proposed patch > > Hi Fanguri, > > What do you think of this patch ? Does it do what you need ? > > Cheers > Nick H

  1   2   3   4   5   6   >