[Bug ld/19327] New: [AArch64] ld should issue an error if a shared library is built from a non-PIC object
https://sourceware.org/bugzilla/show_bug.cgi?id=19327 Bug ID: 19327 Summary: [AArch64] ld should issue an error if a shared library is built from a non-PIC object Product: binutils Version: 2.27 (HEAD) Status: NEW Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: ikudrin.dev at gmail dot com Target Milestone: --- On host (Ubuntu 15.10, x86_64): $ cat d.c int d = 5; int f() { return d; } $ cat m.c #include int d = 42; int f(); int main() { printf("%d\n", f()); return 0; } $ aarch64-linux-gnu-gcc -c d.c -o d.nopic.o $ ld.git -shared d.nopic.o -o d.ld.nopic.so $ aarch64-linux-gnu-gcc m.c ./d.ld.nopic.so -o r.ld.nopic $ aarch64-linux-gnu-gcc -c d.c -o d.pic.o -fPIC $ ld.git -shared d.pic.o -o d.ld.pic.so $ aarch64-linux-gnu-gcc m.c ./d.ld.pic.so -o r.ld.pic Note: ld.git is just built from git sources. On VM with AArch64 Debian: $ ./r.ld.nopic 5 $ ./r.ld.pic 42 Expected bahavior: should report an error similar to other targets: $ gcc -c d.c -o d.nopic.o $ ld -shared d.nopic.o -o d.nopic.so ld: d.nopic.o: relocation R_X86_64_PC32 against symbol `d' can not be used when making a shared object; recompile with -fPIC -- 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/19328] New: [AArch64] gold should issue an error if a shared library is built from a non-PIC object
https://sourceware.org/bugzilla/show_bug.cgi?id=19328 Bug ID: 19328 Summary: [AArch64] gold should issue an error if a shared library is built from a non-PIC object Product: binutils Version: 2.27 (HEAD) Status: NEW Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: ikudrin.dev at gmail dot com CC: ian at airs dot com Target Milestone: --- On host (Ubuntu 15.10, x86_64): $ cat d.c int d = 5; int f() { return d; } $ cat m.c #include int d = 42; int f(); int main() { printf("%d\n", f()); return 0; } $ aarch64-linux-gnu-gcc -c d.c -o d.nopic.o $ gold.git -shared d.nopic.o -o d.gold.nopic.so $ aarch64-linux-gnu-gcc m.c ./d.gold.nopic.so -o r.gold.nopic $ aarch64-linux-gnu-gcc -c d.c -o d.pic.o -fPIC $ gold.git -shared d.pic.o -o d.gold.pic.so $ aarch64-linux-gnu-gcc m.c ./d.gold.pic.so -o r.gold.pic Note: gold.git is just built from git sources. On VM with AArch64 Debian: $ ./r.gold.nopic 5 $ ./r.gold.pic 42 Expected bahavior: should report an error similar to other targets: $ gcc -c d.c -o d.nopic.o $ ld.gold -shared d.nopic.o -o d.nopic.so ld.gold: error: d.nopic.o: requires dynamic R_X86_64_PC32 reloc against 'd' which may overflow at runtime; recompile with -fPIC -- 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/19327] [AArch64] ld should issue an error if a shared library is built from a non-PIC object
https://sourceware.org/bugzilla/show_bug.cgi?id=19327 Igor Kudrin changed: What|Removed |Added See Also||https://sourceware.org/bugz ||illa/show_bug.cgi?id=19328 -- 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/19328] [AArch64] gold should issue an error if a shared library is built from a non-PIC object
https://sourceware.org/bugzilla/show_bug.cgi?id=19328 Igor Kudrin changed: What|Removed |Added See Also||https://sourceware.org/bugz ||illa/show_bug.cgi?id=19327 -- 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/19328] [AArch64] gold should issue an error if a shared library is built from a non-PIC object
https://sourceware.org/bugzilla/show_bug.cgi?id=19328 Igor Kudrin changed: What|Removed |Added CC||ikudrin.dev 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/19327] [AArch64] ld should issue an error if a shared library is built from a non-PIC object
https://sourceware.org/bugzilla/show_bug.cgi?id=19327 Igor Kudrin changed: What|Removed |Added CC||ikudrin.dev 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/20306] New: ld fails when linking with shared object, "--gc-sections" and "-u".
https://sourceware.org/bugzilla/show_bug.cgi?id=20306 Bug ID: 20306 Summary: ld fails when linking with shared object, "--gc-sections" and "-u". Product: binutils Version: 2.27 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: ikudrin.dev at gmail dot com Target Milestone: --- The minimal reproducer: $ cat > test.c << EOF extern void foo(); void bar() {foo();} EOF $ gcc -fPIC -c test.c -o test.o $ ld -shared test.o -o test.so $ ld -u foo --gc-sections -e0 test.so -o test Segmentation fault (core dumped) -- 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/20306] ld fails when linking with shared object, "--gc-sections" and "-u".
https://sourceware.org/bugzilla/show_bug.cgi?id=20306 Igor Kudrin changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #3 from Igor Kudrin --- Thanks for the quick response! -- 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/20315] New: ARM: gas generates deprecated relocations.
https://sourceware.org/bugzilla/show_bug.cgi?id=20315 Bug ID: 20315 Summary: ARM: gas generates deprecated relocations. Product: binutils Version: 2.27 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: binutils Assignee: unassigned at sourceware dot org Reporter: ikudrin.dev at gmail dot com Target Milestone: --- Steps to reproduce: $ binutils/configure --target=armv7l-unknown-linux-gnu. $ make all-gas. $ cat > test.s << EOF .text .globl foo foo: bl foo EOF $ as-new test.s -o test.o $ objdump -dr test.o test.o: file format elf32-littlearm Disassembly of section .text: : 0: ebfebl 0 0: R_ARM_PC24 foo According to "ELF for the ARM Architecture", R_ARM_PC24 is deprecated and "Deprecated codes should not be generated by fully conforming toolchains". This issue also makes gold's testsuite for ARM fail, because gold doesn't support R_ARM_PC24 relocation. -- 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/20315] ARM: gas generates deprecated relocations.
https://sourceware.org/bugzilla/show_bug.cgi?id=20315 Igor Kudrin changed: What|Removed |Added Component|binutils|gas -- 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/20717] --gc-sections fails to remove an unused orphan section if the last output section has a KEEP command.
https://sourceware.org/bugzilla/show_bug.cgi?id=20717 Igor Kudrin changed: What|Removed |Added CC||ikudrin.dev 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 gold/20717] New: --gc-sections fails to remove an unused orphan section if the last output section has a KEEP command.
https://sourceware.org/bugzilla/show_bug.cgi?id=20717 Bug ID: 20717 Summary: --gc-sections fails to remove an unused orphan section if the last output section has a KEEP command. Product: binutils Version: 2.28 (HEAD) Status: UNCONFIRMED Severity: normal Priority: P2 Component: gold Assignee: ccoutant at gmail dot com Reporter: ikudrin.dev at gmail dot com CC: ian at airs dot com Target Milestone: --- Steps to reproduce: $ cat > test.cc << EOF void unused() {} int main() {return 0;} EOF $ cat > test.t << EOF SECTIONS { .dummy : { KEEP (*(.dummy)) } } EOF $ gcc -O0 -ffunction-sections -c test.cc -o test.o $ gcc -fuse-ld=gold -Wl,--gc-sections,-T,test.t test.o -o test $ nm -C test | grep unused 01e9 T unused() -- 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