This is the mail archive of the mailing list for the binutils project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH for PR 20824] enable --warn-shared-textrel by default

Hi Ma,

> GNU-ld now disabled --warn-shared-textrel by default. IMO, it should be 
> enabled by default,

Just to be clear - why do you feel that this should be the default ?

> I'm told to send the patch here for discussions, sorry if this make 
> troubles for you.

The patch as it stands is a good start, but it does not go far enough.
To be specific you need to add the following features:

  * A configure option to select the default behaviour.  IE enabled
    or disabled shared-textrel warnings.  This way package maintainers
    can choose what the default behaviour should be.  Enabling the
    warnings by default should only be done if the configure option
    was not used, or was used and explicitly requested this behaviour.

    See the support for --enable-compressed-debug-sections in the
    linker's file for an example similar to this one.

  * The linker's --help output must make it clear which option is the
    default.  That way a user with no knowledge of how the linker was
    configured can still find out what the default option will be.

  * The linker's documentation must be updated to indicate the new
    default, and to explain that this can be overridden by a configure
    time option as well as a linker command line option.

  * The linker's NEWS file should be updated to mention the new
    behaviour.  That way the announcement will be included in the
    release notes when the next release occurs.

  * As mentioned by Mike Frysinger you also need to include a patch
    to the gold linker to add a similar configure option/behaviour 
    change.  We want to keep the two linkers in sync.

Also - I presume that you have run the linker testsuite with the patch
applied and verified that it does not introduce any regressions.  If
not then please do so, and if there are regressions then the patch needs
to include fixes for them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]