Bug 21351 - documentation for --relax
Summary: documentation for --relax
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-04 09:42 UTC by weremaid
Modified: 2020-08-10 15:37 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
patch containing alternative (271 bytes, patch)
2017-04-04 09:42 UTC, weremaid
Details | Diff
Proposed patch (602 bytes, patch)
2017-04-06 14:51 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description weremaid 2017-04-04 09:42:44 UTC
Created attachment 9968 [details]
patch containing alternative

The documentation for --relax isn't clear about whether or not the use of --no-relax causes an error when the feature is not supported on a platform.

The sentence in question is:
"On platforms where --relax is accepted the option --no-relax can be used to disable the feature."
(there's a comma missing after "accepted")

The set containing all platforms has previously been divided into those where it is 1. supported or 2. ignored. 
("On platforms where this is not supported, --relax is accepted, but ignored.")

If I'm not mistaken, the conditional "On platforms where --relax is accepted" means "all platforms".

Imho, "[On all platforms,] --no-relax can be used to disable the feature" should then also distinguish between supported and merely ignored.

There's a patch with a proposal attached.
Comment 1 Nick Clifton 2017-04-06 14:51:38 UTC
Created attachment 9976 [details]
Proposed patch

Hi Weremaid,

> The documentation for --relax isn't clear about whether or not the use of
> --no-relax causes an error when the feature is not supported on a platform.

Personally I think that the documentation is OK as it is, but I do not object
to rewording it if you think that it will help.

> If I'm not mistaken, the conditional "On platforms where --relax is
> accepted" means "all platforms".

No, I would not agree with that.

> Imho, "[On all platforms,] --no-relax can be used to disable the feature"
> should then also distinguish between supported and merely ignored.

OK.

> There's a patch with a proposal attached.

The patch is a good start, but I think that if we are clarifying this text then we can go further and make things even more straightforward.  What do you think of this revised version of your patch ?

Cheers
  Nick
Comment 2 Fangrui Song 2020-08-09 00:46:31 UTC
The patch looks good:)
Comment 3 Sourceware Commits 2020-08-10 15:36:44 UTC
The master branch has been updated by Nick Clifton <nickc@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=ccd9fae5d57b9a16d00d70d9dad916133ff1ea70

commit ccd9fae5d57b9a16d00d70d9dad916133ff1ea70
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Aug 10 16:35:57 2020 +0100

    Improve the documentation of the linker's --relax option.
    
            PR ld/21351
            * ld.texi: Clarify the behaviour of the --relax and --no-relax
            options on systems that do not support them.
Comment 4 Nick Clifton 2020-08-10 15:37:14 UTC
Patch applied.