[Bug gas/27280] md5 DWARF v5 additions require -gdwarf-5

2021-01-29 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=27280 --- Comment #1 from Fangrui Song --- The idea of .file 0 auto-upgrade is that the compiler should emit .file 0 before .file 1, so the assembler does not need to deal with DWARF v5 md5 syntax. I compiled a top-of-tree GCC. It emits `.file 1` i

[Bug ld/26626] Provide a hook to customize missing library error handling

2020-10-23 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26626 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/26065] ld/testsuite/ld-elf symbolic tests dl4e and dl4f fail

2020-06-09 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=26065 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug binutils/24942] objcopy: Add option for setting section alignment

2019-09-17 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24942 --- Comment #7 from Fangrui Song --- In addition, have you thought about its interaction with --rename-section? Which command should I use: objcopy --rename-section=.foo=.foo2 --set-section-alignment .foo=8 a.o b.o or objcopy --rename-secti

[Bug binutils/24942] objcopy: Add option for setting section alignment

2019-09-17 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24942 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug binutils/24968] New: objcopy: -B is not useful

2019-09-05 Thread maskray at google dot com
Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- objcopy -I binary -O elf64-x86-64 a.txt b # e_machine is EM_NONE objcopy -I binary -B i386:x86-64 -O elf64-x86-64 a.txt c # e_machine is EM_X86_64 cmp -l b c

[Bug gold/19823] gold produces copy reloc of protected symbols

2019-09-01 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=19823 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/22843] Provide dependency information from the linker similar to the compiler

2019-08-31 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=22843 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/24505] Should --nmagic affect MAXPAGESIZE/COMMONPAGESIZE?

2019-08-15 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24505 --- Comment #2 from Fangrui Song --- Thanks for the reply. I've tried hard to find who are using both CONSTANT(COMMONPAGESIZE) and -n/-N in the wild. It looks only Tianocore edk2 (ab)uses -n -z common-page-size=0x20 to use CONSTANT(COMMONPAG

[Bug ld/24896] [powerpc] ld can probably drop R_PPC64_UADDR64 conversion

2019-08-14 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24896 --- Comment #3 from Fangrui Song --- Thanks for the information. * Aligned R_PPC64_UADDR64 -> R_PPC64_ADDR64 => the code is there and it doesn't hurt anyone, so let's keep it * Misaligned R_PPC64_ADDR64 -> R_PPC64_UADDR64 => this matters on

[Bug ld/24896] [powerpc] ld can probably drop R_PPC64_UADDR64 conversion

2019-08-13 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24896 --- Comment #1 from Fangrui Song --- Thinking more. ADDR/UADDR distinction probably makes little sense. I withdraw my proposal that teachs gas to emit UADDR. Some ld conversion rules can probably be deleted: Aligned R_PPC64_UADDR64 -> R_PPC6

[Bug ld/24896] [powerpc] ld can probably drop R_PPC64_UADDR64 conversion

2019-08-13 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24896 Fangrui Song changed: What|Removed |Added Component|gas |ld Summary|[powerpc] gas sh

[Bug gas/24896] New: [powerpc] gas should emit R_PPC_UADDR32/R_PPC64_UADDR64 at unaligned locations if the section is sufficiently aligned

2019-08-11 Thread maskray at google dot com
Version: 2.33 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- Related to both gas and ld. gas emits

[Bug gas/24896] [powerpc] gas should emit R_PPC_UADDR32/R_PPC64_UADDR64 at unaligned locations if the section is sufficiently aligned

2019-08-11 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24896 Fangrui Song changed: What|Removed |Added Target||powerpc* -- You are receiving this ma

[Bug ld/18815] Failed to mark ELFOSABI_GNU with local IFUNC symbols

2019-08-11 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18815 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug binutils/24887] New: readelf --notes: left justify "Data size"

2019-08-06 Thread maskray at google dot com
iority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- % readelf -n core ... Owner Data size Description CORE 0x0150 N

[Bug ld/24815] ld fails to find symbols from DT_NEEDED entries

2019-07-29 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24815 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/24784] elf_x86_64_check_tls_transition should allow R_X86_64_GOTPCREL (-fno-plt)

2019-07-15 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24784 --- Comment #7 from Fangrui Song --- > For the occurrence of name@GOTPCREL in the following assembler instructions: > call *name@GOTPCREL(%rip) I agree, yet it also says: > (PIC) the base of GOT is within 2GB an indirect call to the GOT ent

[Bug ld/24784] elf_x86_64_check_tls_transition should allow R_X86_64_GOTPCREL (-fno-plt)

2019-07-13 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24784 --- Comment #5 from Fangrui Song --- I don't see how this bug is "invalid". I've already worked around the bug in clang, but I hope this hack can be deleted in a few years. > g++ -fno-plt -fpic a.cc -Wa,-mrelax-relocations=no -fuse-ld=bfd I

[Bug ld/24784] elf_x86_64_check_tls_transition should allow R_X86_64_GOTPCREL (-fno-plt)

2019-07-12 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24784 --- Comment #3 from Fangrui Song --- This was discovered by a Rust user. They use clang integrated assembler (not GNU as) with GNU ld. The integrated assembler isn't configured with -Wa,-mrelax-relocations=yes on by default. I worked around th

[Bug ld/24784] elf_x86_64_check_tls_transition should allow R_X86_64_GOTPCREL (-fno-plt)

2019-07-12 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24784 --- Comment #2 from Fangrui Song --- (In reply to H.J. Lu from comment #1) > Since the new linker is required to support no-PLT TLS sequence, > R_X86_64_GOTPCRELX should be used here. R_X86_64_GOTPCREL won't > work with the old linker anyway.

[Bug gold/16794] gold doesn't include the "implicit addend" when processing REL relocations to mergable sections

2019-07-09 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=16794 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug gold/20216] Gold should support x86-64 TLS code sequences without PLT

2019-07-07 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=20216 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/24784] New: elf_x86_64_check_tls_transition should allow R_X86_64_GOTPCREL (-fno-plt)

2019-07-07 Thread maskray at google dot com
Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- thread_local int a; int main() { return a; } % g++ -fno-plt -fpic a.cc -Wa,-mrelax-relocations=no -fuse-ld=bfd

[Bug ld/24769] [RISCV] partial RELRO doesn't work: .got is not in PT_GNU_RELRO

2019-07-04 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24769 Fangrui Song changed: What|Removed |Added Target||riscv*-*-* -- You are receiving this

[Bug ld/24769] New: [RISCV] partial RELRO doesn't work: .got is not in PT_GNU_RELRO

2019-07-04 Thread maskray at google dot com
erity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- % riscv64-linux-gnu-gcc -fuse-ld=bfd a.c -Wl,-z,relro -Wl,-Map,a.map -o a % readelf -l a 07 .preinit_

[Bug binutils/24702] New: objdump: use STT_SECTION symbol in the symbolizer

2019-06-18 Thread maskray at google dot com
Component: binutils Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- STT_SECTION symbols are not used to symbolize addresses in objdump -d output, but that will be useful when the relevant symbols are missing. e.g. In a

[Bug ld/17369] The PF_X bit is set on PT_PHDR segment

2019-06-17 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=17369 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/18289] Support copy relocation in PIE

2019-06-17 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=18289 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/24490] -z max-page-size=0x200000 -z separate-code creates huge binary

2019-06-16 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24490 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/24683] RISC-V call and callplt reloc handling

2019-06-16 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24683 Fangrui Song changed: What|Removed |Added CC||maskray at google dot com --- Comment

[Bug ld/24685] [RISCV] R_RISCV_CALL_PLT should not create a canonical PLT in -no-pie mode

2019-06-15 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24685 Fangrui Song changed: What|Removed |Added Target||riscv*-*-* -- You are receiving this

[Bug ld/24685] New: [RISCV] R_RISCV_CALL_PLT should not create a canonical PLT in -no-pie mode

2019-06-15 Thread maskray at google dot com
Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- A canonical PLT (the term is not widely used. I just saw it used by a few people) in an executable has a section

[Bug ld/24676] [RISCV] Redundant R_RISCV_DTPMOD* R_RISCV_DTPREL* resulted from Global Dynamic -> Local Exec relaxation

2019-06-13 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24676 Fangrui Song changed: What|Removed |Added Summary|[RISCV] Redundant |[RISCV] Redundant |R

[Bug ld/24676] [RISCV] Redundant R_RISCV_DTPMOD* R_RISCV_DTPREL* resulted from Glocal Dynamic -> Local Exec relaxation

2019-06-13 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24676 Fangrui Song changed: What|Removed |Added Target||riscv*-*-* -- You are receiving this

[Bug ld/24676] New: [RISCV] Redundant R_RISCV_DTPMOD* R_RISCV_DTPREL* resulted from Glocal Dynamic -> Local Exec relaxation

2019-06-13 Thread maskray at google dot com
EAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- RISC-V psABI doesn't specify TLS relaxation. Though the code sequences

[Bug ld/24673] [RISCV] -fPIC -pie and -fPIC -no-pie create unexpected R_RISCV_NONE R_RISCV_DTPMOD64 relocations

2019-06-12 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24673 Fangrui Song changed: What|Removed |Added Target||riscv64-*-* -- You are receiving this

[Bug ld/24673] New: [RISCV] -fPIC -pie and -fPIC -no-pie create unexpected R_RISCV_NONE R_RISCV_DTPMOD64 relocations

2019-06-12 Thread maskray at google dot com
: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- static __thread int a; int foo() {return a;} int main() {} riscv-gcc -fuse-ld=bfd -fPIC

[Bug binutils/24627] readelf -V output is inconsistent

2019-05-30 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24627 --- Comment #5 from Fangrui Song --- One remaining issue (after ae9ac79e5e291a2bc5c6620a10c37a3558d55d36). Does `00: Rev: 1` below need a similar %# fix? Version definition section '.gnu.version_d' contains 26 entries: Addr: 0x00

[Bug binutils/24627] readelf -V output is inconsistent

2019-05-30 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24627 Fangrui Song changed: What|Removed |Added Summary|readelf -V output is ugly |readelf -V output is

[Bug binutils/24627] readelf -V output is ugly

2019-05-29 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=24627 --- Comment #1 from Fangrui Song --- Sorry, in .gnu.version_d, `Addr:` is indented by 2. -- You are receiving this mail because: You are on the CC list for the bug. ___ bug-binutils mailing list bu

[Bug binutils/24627] New: readelf -V output is ugly

2019-05-29 Thread maskray at google dot com
Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- % readelf -V /lib/x86_64-linux-gnu/libc.so.6 Version symbols section '.gnu.version' contains 2247 entries: Addr: 00016a3a Offset: 0x016a3a Link: 4 (.dyn

[Bug ld/24601] New: aarch64: local-exec TPREL relocations to weak undefined symbols -> assertion fail

2019-05-22 Thread maskray at google dot com
MED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- % cat a.c __attribute__((weak,tls_model("local-exec"))) extern __thread char tls; char *g

[Bug ld/24600] New: Support --start-lib --end-lib

2019-05-22 Thread maskray at google dot com
Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- --start-lib gives following object files (before --end-lib) archive semantics. They are handy if you don't want to create archives for the semantics. Some build system make

[Bug gold/24526] New: Generalize GC support for SHF_LINK_ORDER

2019-05-05 Thread maskray at google dot com
Component: gold Assignee: ccoutant at gmail dot com Reporter: maskray at google dot com CC: ian at airs dot com Target Milestone: --- There was a discussion https://groups.google.com/d/msg/generic-abi/_CbBM6T6WeM/9nNnwRNHAQAJ to extend the semantics of

[Bug binutils/24511] New: nm should not mark symbols in .init_array as "t"

2019-05-02 Thread maskray at google dot com
iority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- // bfd/syms.c static const struct section_to_type stt[] = { {".bss", 'b'}, {"code", 't

[Bug ld/24505] New: Should --nmagic affect MAXPAGESIZE/COMMONPAGESIZE?

2019-04-30 Thread maskray at google dot com
Component: ld Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- -n/--nmagic disables page alignment of sections. Should it affect the target specific constants MAXPAGESIZE and COMMONPAGESIZE by changing them to 1? % cat

[Bug binutils/23850] GNU strip should not discard/move .rela.plt in executable linking glibc statically

2018-11-02 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23850 Fangrui Song changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution|---

[Bug binutils/23850] GNU strip should not discard/move .rela.plt in executable linking glibc statically

2018-11-01 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23850 --- Comment #3 from Fangrui Song --- (In reply to Alan Modra from comment #2) > .rela.plt in a static executable can only contain IRELATIVE relocations that > must have a zero symbol index. Thus it is not necessary for that particular > SHT_R

[Bug binutils/23850] GNU strip should not discard/move .rela.plt in executable linking glibc statically

2018-11-01 Thread maskray at google dot com
https://sourceware.org/bugzilla/show_bug.cgi?id=23850 --- Comment #1 from Fangrui Song --- Is this because .rela.plt (SHF_ALLOC) should not have sh_link pointing to .symtab (non-SHF_ALLOC)? If it is the case, perhaps `readelf -S a` should not warn on such executable. -- You are receiving this m

[Bug binutils/23850] New: GNU strip should not discard/move .rela.plt in executable linking glibc statically

2018-11-01 Thread maskray at google dot com
Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: maskray at google dot com Target Milestone: --- This is similar to Bug 10337 but is a different incarnation. When linking glibc statically, .rel