bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/20824] enable warn-shared-textrel by default


From: i at maskray dot me
Subject: [Bug ld/20824] enable warn-shared-textrel by default
Date: Sun, 24 May 2020 22:38:34 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=20824

Fangrui Song <i at maskray dot me> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |i at maskray dot me

--- Comment #3 from Fangrui Song <i at maskray dot me> ---
See https://sourceware.org/bugzilla/show_bug.cgi?id=25694#c3

Instead of enabled-by-default --warn-shared-textrel, we can

* make bfd_link_info::error_textrel default to 1
* delete warn_shared_textrel
* make --warn-shared-textrel a no-op

The bi-state approach is used by LLD: either -z notext or -z text. There is no
state where DT_TEXTREL/DF_TEXTREL is added on demand. The diagnostic should
remind the user that -z notext may be needed.

ld.lld: error: can't create dynamic relocation R_386_32 against symbol: gdt in
readonly segment; recompile object files with -fPIC or pass '-Wl,-z,notext' to
allow text relocations in the output
>>> defined in a.o
>>> referenced by a.o:(.text+0x2)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]