|
From: | peter at lekensteyn dot nl |
Subject: | [Bug ld/20550] New: Linking a MPX instrumented shared object fails with -pie |
Date: | Sat, 03 Sep 2016 13:47:49 +0000 |
https://sourceware.org/bugzilla/show_bug.cgi?id=20550 Bug ID: 20550 Summary: Linking a MPX instrumented shared object fails with -pie Product: binutils Version: 2.27 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: peter at lekensteyn dot nl Target Milestone: --- An attempt to link a shared object containing an array with another object that uses this array fails when using -pie and Intel MPX. Software versions: Distribution: Arch Linux GCC 6.2.1-1 (also reproduced with 6.1.1-5) binutils 2.27-1 Reproducer: cc -mmpx -fcheck-pointer-bounds -fPIC -c -o main.o main.c cc -mmpx -fcheck-pointer-bounds -fPIC -c -o other.o other.c cc -mmpx -fcheck-pointer-bounds -fPIC -o other.so other.o -shared cc -mmpx -fcheck-pointer-bounds -fPIC -pie -o main main.o other.so /usr/bin/ld: main.o(.text+0x5e): reloc against `strings': error 4 /usr/bin/ld: final link failed: Nonrepresentable section on output collect2: error: ld returned 1 exit status make: *** [Makefile:5: main] Error 1 ==> main.c <== #include <stdio.h> extern const char *strings[]; int main() { printf("%s\n", strings[0]); return 0; } ==> other.c <== const char *strings[] = { "test" }; -- You are receiving this mail because: You are on the CC list for the bug.
[Prev in Thread] | Current Thread | [Next in Thread] |