https://sourceware.org/bugzilla/show_bug.cgi?id=20824
Bug ID: 20824
Summary: enable warn-shared-textrel by default
Product: binutils
Version: 2.28 (HEAD)
Status: UNCONFIRMED
Severity: enhancement
Priority: P2
Component: ld
Assignee: unassigned at sourceware dot org
Reporter: ma.jiang at zte dot com.cn
Target Milestone: ---
Created attachment 9636
--> https://sourceware.org/bugzilla/attachment.cgi?id=9636&action=edit
enable warn-shared-textrel by default
In gnu-ld, warn-shared-textrel is disabled by default. Why not to enable it by
default?
One of our customers found that he did not have enough memory to run his
application after a recompilation. The root cause turn out to be a silly
mistake that he forgot to add "-fPIC" for his shared libraries. Yes yes, the
one who make mistakes got to pay the price, it's very reasonable. But there
were no warning at all, a normal user(not a expert) probably did not know what
was wrong (and how to fix). This does not seem reasonable...
Although some arches(like x86-64) force all shared libraries to be PIC, there
are some that does not. In my opinion, the linker should be a good place to
make the warnings. So, warn-shared-textrel should be enable by default.
attached patch enable "warn-shared-textrel" and add a new option to close
this warning, is that ok?
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
bug-binutils mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-binutils