[COMMITTED] ld: Move "-O 0" option to binutils 2.47 section

Message ID CAMe9rOpYNsOw-ESSSj1-K098mGUS-hCxGKRN4E9hDd9O82d7Wg@mail.gmail.com
State New
Headers
Series [COMMITTED] ld: Move "-O 0" option to binutils 2.47 section |

Checks

Context Check Description
linaro-tcwg-bot/tcwg_binutils_build--master-arm fail Patch failed to apply
linaro-tcwg-bot/tcwg_binutils_build--master-aarch64 fail Patch failed to apply

Commit Message

H.J. Lu April 16, 2026, 1:46 a.m. UTC
  On Thu, Apr 9, 2026 at 5:03 PM Nick Clifton <nickc@redhat.com> wrote:
>
> Hi Guys,
>
>    OK, attached is version 3 of the patch.  It adds "-O default" as means
>    to reset the optimization behaviour back to the default, and just for
>    completeness it also adds "-O fast" as an alias for "-O 0".
>
>    How does this version look to you ?

Since "-O 0" option is added to binutils 2.47, move it to binutils 2.47
section.

* NEWS: Move "-O 0" option to binutils 2.47 section.

Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
---
 ld/NEWS | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Jan Beulich April 16, 2026, 6:17 a.m. UTC | #1
On 16.04.2026 03:46, H.J. Lu wrote:
> --- a/ld/NEWS
> +++ b/ld/NEWS
> @@ -1,12 +1,12 @@
>  -*- text -*-
> 
> +Changes in 2.47:
> +
>  * Add a linker optimization level of zero.  Using "-O 0" on the linker command
>    line will stop it from combining the contents of mergeable sections.  This
>    can significantly speed up the link process at the cost of producing larger
>    binaries.
> 
> -Changes in 2.47:
> -
>  * Add linker support for --start-lib/--end-lib options and LIB linker script
>    statement for treating a list of object files as members of an artificial
>    archive.

Wasn't that "Changes in 2.47:" put there prematurely anyway? Doesn't this normally
get added while cutting a release?

Jan
  
H.J. Lu April 16, 2026, 7:06 a.m. UTC | #2
On Thu, Apr 16, 2026 at 2:17 PM Jan Beulich <jbeulich@suse.com> wrote:
>
> On 16.04.2026 03:46, H.J. Lu wrote:
> > --- a/ld/NEWS
> > +++ b/ld/NEWS
> > @@ -1,12 +1,12 @@
> >  -*- text -*-
> >
> > +Changes in 2.47:
> > +
> >  * Add a linker optimization level of zero.  Using "-O 0" on the linker command
> >    line will stop it from combining the contents of mergeable sections.  This
> >    can significantly speed up the link process at the cost of producing larger
> >    binaries.
> >
> > -Changes in 2.47:
> > -
> >  * Add linker support for --start-lib/--end-lib options and LIB linker script
> >    statement for treating a list of object files as members of an artificial
> >    archive.
>
> Wasn't that "Changes in 2.47:" put there prematurely anyway? Doesn't this normally
> get added while cutting a release?
>
> Jan

If they aren't taken out before 2.47 release, they are in 2.47 release.
  
Alan Modra April 17, 2026, 1:33 a.m. UTC | #3
Only put labels in first column of tests, for hppa64-hpux.
Also trim off trailing whitespace.  The test will continue to fail on
hppa64-hpux until Dave's dummy milli.a testsuite change is committed.

diff --git a/ld/testsuite/ld-elf/merge5.a.s b/ld/testsuite/ld-elf/merge5.a.s
index 8fe6a6967f2..8a635d09834 100644
--- a/ld/testsuite/ld-elf/merge5.a.s
+++ b/ld/testsuite/ld-elf/merge5.a.s
@@ -1,4 +1,4 @@
-.section .rodata.str,"aMS","progbits",1 
-.global .merge1
-.merge1: 
-	.asciz "abc" 
+	.section .rodata.str,"aMS","progbits",1
+	.global .merge1
+.merge1:
+	.asciz "abc"
diff --git a/ld/testsuite/ld-elf/merge5.b.s b/ld/testsuite/ld-elf/merge5.b.s
index 79ac2fc4e6c..8ed36dfeacb 100644
--- a/ld/testsuite/ld-elf/merge5.b.s
+++ b/ld/testsuite/ld-elf/merge5.b.s
@@ -1,4 +1,4 @@
-.section .rodata.str,"aMS","progbits",1 
-.global .merge2
-.merge2: 
-	.asciz "abc" 
+	.section .rodata.str,"aMS","progbits",1
+	.global .merge2
+.merge2:
+	.asciz "abc"
  

Patch

diff --git a/ld/NEWS b/ld/NEWS
index aa7a9251821..2de87ae227c 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,12 +1,12 @@ 
 -*- text -*-

+Changes in 2.47:
+
 * Add a linker optimization level of zero.  Using "-O 0" on the linker command
   line will stop it from combining the contents of mergeable sections.  This
   can significantly speed up the link process at the cost of producing larger
   binaries.

-Changes in 2.47:
-
 * Add linker support for --start-lib/--end-lib options and LIB linker script
   statement for treating a list of object files as members of an artificial
   archive.