Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* Re: [PATCH] alpha, ld: remove -taso option
       [not found] <Z4pr4tVtVYToa5YU@minute>
@ 2025-01-17 14:47 ` Sam James
  2025-01-17 15:00   ` Ivan Kokshaysky
  2025-01-18  7:33 ` Maciej W. Rozycki
  1 sibling, 1 reply; 11+ messages in thread
From: Sam James @ 2025-01-17 14:47 UTC (permalink / raw)
  To: Ivan Kokshaysky; +Cc: binutils, gdb-patches

Ivan Kokshaysky <ink@unseen.parts> writes:

> The -taso switch was quite useful 25 years ago for porting 32-bit
> code with broken integer-pointer casting. Not anymore. The EF_ALPHA_32BIT
> support is going to be dropped in Linux kernel v6.14 [1], NetBSD and OpenBSD
> never had it, so there is no point in keeping the -taso option around.
>
> Also remove alpha special case that uses -taso from gdb.base/dump.exp
> in gdb testsuite.
>
> [1] https://lore.kernel.org/all/87jzb2tdb7.fsf_-_@email.froward.int.ebiederm.org
>
> Signed-off-by: Ivan Kokshaysky <ink@unseen.parts>
> ---
>  gdb/testsuite/gdb.base/dump.exp |  6 ------
>  ld/emultempl/alphaelf.em        | 31 -------------------------------
>  ld/po/bg.po                     |  7 -------
>  ld/po/es.po                     |  9 ---------
>  ld/po/fi.po                     | 12 ------------
>  ld/po/fr.po                     |  9 ---------
>  ld/po/ka.po                     |  7 -------
>  ld/po/ld.pot                    |  8 --------
>  ld/po/pt_BR.po                  |  9 ---------
>  ld/po/ro.po                     |  9 ---------
>  ld/po/ru.po                     |  9 ---------
>  ld/po/sr.po                     |  9 ---------
>  ld/po/sv.po                     | 12 ------------
>  ld/po/uk.po                     |  9 ---------
>  14 files changed, 146 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
> index 58fedb1d36b..54efe51fbaa 100644
> --- a/gdb/testsuite/gdb.base/dump.exp
> +++ b/gdb/testsuite/gdb.base/dump.exp
> @@ -26,12 +26,6 @@ set endian "auto"
>  
>  set formats {binary ihex srec tekhex  verilog}
>  
> -if {[istarget "alpha*-*-*"]} {
> -    # SREC etc cannot handle 64-bit addresses.  Force the test
> -    # program into the low 31 bits of the address space.
> -    lappend options "ldflags=-Wl,-taso"
> -}

Is this part right? SREC is a debugging format, so if we're going to do
this, we'd need to drop the SREC format, or accept it's going to be
untested, I think?

Adding gdb-patches@.

> [...]

thanks,
sam

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] alpha, ld: remove -taso option
  2025-01-17 14:47 ` [PATCH] alpha, ld: remove -taso option Sam James
@ 2025-01-17 15:00   ` Ivan Kokshaysky
  2025-01-17 21:17     ` Sam James
  0 siblings, 1 reply; 11+ messages in thread
From: Ivan Kokshaysky @ 2025-01-17 15:00 UTC (permalink / raw)
  To: Sam James; +Cc: binutils, gdb-patches

On Fri, Jan 17, 2025 at 02:47:28PM +0000, Sam James wrote:
> Ivan Kokshaysky <ink@unseen.parts> writes:
...
> > diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
> > index 58fedb1d36b..54efe51fbaa 100644
> > --- a/gdb/testsuite/gdb.base/dump.exp
> > +++ b/gdb/testsuite/gdb.base/dump.exp
> > @@ -26,12 +26,6 @@ set endian "auto"
> >  
> >  set formats {binary ihex srec tekhex  verilog}
> >  
> > -if {[istarget "alpha*-*-*"]} {
> > -    # SREC etc cannot handle 64-bit addresses.  Force the test
> > -    # program into the low 31 bits of the address space.
> > -    lappend options "ldflags=-Wl,-taso"
> > -}
> 
> Is this part right? SREC is a debugging format, so if we're going to do
> this, we'd need to drop the SREC format, or accept it's going to be
> untested, I think?

Yes, this test will be skipped just like on any other 64-bit architecture.
But if we keep it, it would fail with linux kernels starting from v6.14.

> Adding gdb-patches@.
> 
> > [...]
> 
> thanks,
> sam

Ivan.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] alpha, ld: remove -taso option
  2025-01-17 15:00   ` Ivan Kokshaysky
@ 2025-01-17 21:17     ` Sam James
  0 siblings, 0 replies; 11+ messages in thread
From: Sam James @ 2025-01-17 21:17 UTC (permalink / raw)
  To: Ivan Kokshaysky; +Cc: binutils, gdb-patches

Ivan Kokshaysky <ink@unseen.parts> writes:

> On Fri, Jan 17, 2025 at 02:47:28PM +0000, Sam James wrote:
>> Ivan Kokshaysky <ink@unseen.parts> writes:
> ...
>> > diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
>> > index 58fedb1d36b..54efe51fbaa 100644
>> > --- a/gdb/testsuite/gdb.base/dump.exp
>> > +++ b/gdb/testsuite/gdb.base/dump.exp
>> > @@ -26,12 +26,6 @@ set endian "auto"
>> >  
>> >  set formats {binary ihex srec tekhex  verilog}
>> >  
>> > -if {[istarget "alpha*-*-*"]} {
>> > -    # SREC etc cannot handle 64-bit addresses.  Force the test
>> > -    # program into the low 31 bits of the address space.
>> > -    lappend options "ldflags=-Wl,-taso"
>> > -}
>> 
>> Is this part right? SREC is a debugging format, so if we're going to do
>> this, we'd need to drop the SREC format, or accept it's going to be
>> untested, I think?
>
> Yes, this test will be skipped just like on any other 64-bit architecture.
> But if we keep it, it would fail with linux kernels starting from v6.14.

Yes, for some reason, I'd got it in my head that it was especially an
alpha-specific format, but it ain't. Thanks.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] alpha, ld: remove -taso option
       [not found] <Z4pr4tVtVYToa5YU@minute>
  2025-01-17 14:47 ` [PATCH] alpha, ld: remove -taso option Sam James
@ 2025-01-18  7:33 ` Maciej W. Rozycki
  2025-01-18  7:37   ` Maciej W. Rozycki
  1 sibling, 1 reply; 11+ messages in thread
From: Maciej W. Rozycki @ 2025-01-18  7:33 UTC (permalink / raw)
  To: Ivan Kokshaysky; +Cc: binutils, gdb-patches

On Fri, 17 Jan 2025, Ivan Kokshaysky wrote:

>  ld/po/bg.po                     |  7 -------
>  ld/po/es.po                     |  9 ---------
>  ld/po/fi.po                     | 12 ------------
>  ld/po/fr.po                     |  9 ---------
>  ld/po/ka.po                     |  7 -------
>  ld/po/ld.pot                    |  8 --------
>  ld/po/pt_BR.po                  |  9 ---------
>  ld/po/ro.po                     |  9 ---------
>  ld/po/ru.po                     |  9 ---------
>  ld/po/sr.po                     |  9 ---------
>  ld/po/sv.po                     | 12 ------------
>  ld/po/uk.po                     |  9 ---------

 We don't regenerate locales with code updates, so please remove this 
part; changes will be picked up by the translation team on the next 
iteration.

> diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em
> index 5ae2587a653..995d7f07a7f 100644
> --- a/ld/emultempl/alphaelf.em
> +++ b/ld/emultempl/alphaelf.em
> @@ -97,40 +83,24 @@ alpha_before_allocation (void)
>        && ! RELAXATION_DISABLED_BY_USER)
>      ENABLE_RELAXATION;
>  }
> -
> -static void
> -alpha_finish (void)
> -{
> -  if (limit_32bit)
> -    elf_elfheader (link_info.output_bfd)->e_flags |= EF_ALPHA_32BIT;
> -
> -  ldelf_finish ();
> -}
>  EOF
>  
>  # Define some shell vars to insert bits of code into the standard elf
>  # parse_args and list_options functions.
>  #
>  PARSE_AND_LIST_LONGOPTS='
> -  { "taso", no_argument, NULL, OPTION_TASO },
>    { "secureplt", no_argument, NULL, OPTION_SECUREPLT },
>    { "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
>  '
>  
>  PARSE_AND_LIST_OPTIONS='
>    fprintf (file, _("\
> -  --taso                      Load executable in the lower 31-bit addressable\n\
> -                                virtual address range\n"));
> -  fprintf (file, _("\
>    --secureplt                 Force PLT in text segment\n"));
>    fprintf (file, _("\
>    --no-secureplt              Force PLT in data segment\n"));
>  '
>  
>  PARSE_AND_LIST_ARGS_CASES='
> -    case OPTION_TASO:
> -      limit_32bit = 1;
> -      break;

 Please remove OPTION_TASO definition from ld/ldlex.h as well.

  Maciej

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] alpha, ld: remove -taso option
  2025-01-18  7:33 ` Maciej W. Rozycki
@ 2025-01-18  7:37   ` Maciej W. Rozycki
  2025-01-18  8:40     ` Ivan Kokshaysky
  2025-01-18 10:17     ` [PATCH v2] " Ivan Kokshaysky
  0 siblings, 2 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2025-01-18  7:37 UTC (permalink / raw)
  To: Ivan Kokshaysky; +Cc: binutils, gdb-patches

On Sat, 18 Jan 2025, Maciej W. Rozycki wrote:

>  Please remove OPTION_TASO definition from ld/ldlex.h as well.

 Also this removes a user option, so please add an entry to binutils/NEWS.

  Maciej

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] alpha, ld: remove -taso option
  2025-01-18  7:37   ` Maciej W. Rozycki
@ 2025-01-18  8:40     ` Ivan Kokshaysky
  2025-01-18 10:17     ` [PATCH v2] " Ivan Kokshaysky
  1 sibling, 0 replies; 11+ messages in thread
From: Ivan Kokshaysky @ 2025-01-18  8:40 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: binutils, gdb-patches

On Sat, Jan 18, 2025 at 07:37:23AM +0000, Maciej W. Rozycki wrote:
> On Sat, 18 Jan 2025, Maciej W. Rozycki wrote:
> 
> >  Please remove OPTION_TASO definition from ld/ldlex.h as well.

Oops, missed this one.

>  Also this removes a user option, so please add an entry to binutils/NEWS.

Will do, thanks for the comments!

Ivan.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [PATCH v2] alpha, ld: remove -taso option
  2025-01-18  7:37   ` Maciej W. Rozycki
  2025-01-18  8:40     ` Ivan Kokshaysky
@ 2025-01-18 10:17     ` Ivan Kokshaysky
  2025-01-20 17:50       ` Maciej W. Rozycki
                         ` (2 more replies)
  1 sibling, 3 replies; 11+ messages in thread
From: Ivan Kokshaysky @ 2025-01-18 10:17 UTC (permalink / raw)
  To: Maciej W. Rozycki; +Cc: binutils, gdb-patches

The -taso switch was quite useful 25 years ago for porting 32-bit
code with broken integer-pointer casting. Not anymore. The EF_ALPHA_32BIT
Linux support is going to be dropped in kernel v6.14 [1], NetBSD and OpenBSD
never had it, so there is no point in keeping the -taso option around.

Also remove alpha special case that uses -taso from gdb.base/dump.exp
in gdb testsuite.

[1] https://lore.kernel.org/all/87jzb2tdb7.fsf_-_@email.froward.int.ebiederm.org

Signed-off-by: Ivan Kokshaysky <ink@unseen.parts>
---
Changes in v2, suggested by Maciej W. Rozycki:
  - leave the translations alone;
  - remove OPTION_TASO from ld/ldlex.h;
  - add entries to ld/NEWS and binutils/NEWS.
---
 binutils/NEWS                   |  3 +++
 gdb/testsuite/gdb.base/dump.exp |  6 ------
 ld/NEWS                         |  3 +++
 ld/emultempl/alphaelf.em        | 31 -------------------------------
 ld/ldlex.h                      |  1 -
 5 files changed, 6 insertions(+), 38 deletions(-)

diff --git a/binutils/NEWS b/binutils/NEWS
index f4687e6c2bc..9c1a54c9355 100644
--- a/binutils/NEWS
+++ b/binutils/NEWS
@@ -1,5 +1,8 @@
 -*- text -*-
 
+* Remove the linker -taso option for Alpha target, as Linux/Alpha kernel
+  support for 32-bit pointers has been removed.
+
 * Support for Nios II targets has been removed except in the readelf utility,
   as this architecture has been EOL'ed by Intel.
 
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index 58fedb1d36b..54efe51fbaa 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -26,12 +26,6 @@ set endian "auto"
 
 set formats {binary ihex srec tekhex  verilog}
 
-if {[istarget "alpha*-*-*"]} {
-    # SREC etc cannot handle 64-bit addresses.  Force the test
-    # program into the low 31 bits of the address space.
-    lappend options "ldflags=-Wl,-taso"
-}
-
 # Runs the command 'print zero_all ()'.  Uses the PRINT_ZERO_ALL_COUNT
 # global to ensure the test names are unique.
 set print_zero_all_count 0
diff --git a/ld/NEWS b/ld/NEWS
index aa3d3e83f35..ccdfc56ac84 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -1,5 +1,8 @@
 -*- text -*-
 
+* Remove the linker -taso option for Alpha target, as Linux/Alpha kernel
+  support for 32-bit pointers has been removed.
+
 * Support for Nios II target has been removed, as this architecture has been
   EOL'ed by Intel.
 
diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em
index 5ae2587a653..995d7f07a7f 100644
--- a/ld/emultempl/alphaelf.em
+++ b/ld/emultempl/alphaelf.em
@@ -28,14 +28,8 @@ fragment <<EOF
 #include "elf/alpha.h"
 #include "elf-bfd.h"
 
-static bool limit_32bit;
-
 extern bool elf64_alpha_use_secureplt;
 
-
-/* Set the start address as in the Tru64 ld.  */
-#define ALPHA_TEXT_START_32BIT 0x12000000
-
 static void
 alpha_after_open (void)
 {
@@ -73,14 +67,6 @@ static void
 alpha_after_parse (void)
 {
   link_info.relax_pass = 2;
-  if (limit_32bit
-      && !bfd_link_pic (&link_info)
-      && !bfd_link_relocatable (&link_info))
-    lang_section_start (".interp",
-			exp_binop ('+',
-				   exp_intop (ALPHA_TEXT_START_32BIT),
-				   exp_nameop (SIZEOF_HEADERS, NULL)),
-			NULL);
 
   ldelf_after_parse ();
 }
@@ -97,40 +83,24 @@ alpha_before_allocation (void)
       && ! RELAXATION_DISABLED_BY_USER)
     ENABLE_RELAXATION;
 }
-
-static void
-alpha_finish (void)
-{
-  if (limit_32bit)
-    elf_elfheader (link_info.output_bfd)->e_flags |= EF_ALPHA_32BIT;
-
-  ldelf_finish ();
-}
 EOF
 
 # Define some shell vars to insert bits of code into the standard elf
 # parse_args and list_options functions.
 #
 PARSE_AND_LIST_LONGOPTS='
-  { "taso", no_argument, NULL, OPTION_TASO },
   { "secureplt", no_argument, NULL, OPTION_SECUREPLT },
   { "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
 '
 
 PARSE_AND_LIST_OPTIONS='
   fprintf (file, _("\
-  --taso                      Load executable in the lower 31-bit addressable\n\
-                                virtual address range\n"));
-  fprintf (file, _("\
   --secureplt                 Force PLT in text segment\n"));
   fprintf (file, _("\
   --no-secureplt              Force PLT in data segment\n"));
 '
 
 PARSE_AND_LIST_ARGS_CASES='
-    case OPTION_TASO:
-      limit_32bit = 1;
-      break;
     case OPTION_SECUREPLT:
       elf64_alpha_use_secureplt = true;
       break;
@@ -144,4 +114,3 @@ PARSE_AND_LIST_ARGS_CASES='
 LDEMUL_AFTER_OPEN=alpha_after_open
 LDEMUL_AFTER_PARSE=alpha_after_parse
 LDEMUL_BEFORE_ALLOCATION=alpha_before_allocation
-LDEMUL_FINISH=alpha_finish
diff --git a/ld/ldlex.h b/ld/ldlex.h
index b8b7d6b6829..999d0defc61 100644
--- a/ld/ldlex.h
+++ b/ld/ldlex.h
@@ -246,7 +246,6 @@ enum option_values
   OPTION_LIBPATH,
   OPTION_NOLIBPATH,
   /* Used by emultempl/alphaelf.em.  */
-  OPTION_TASO,
   OPTION_SECUREPLT,
   OPTION_NO_SECUREPLT,
   /* Used by emultempl/armelf.em.  */

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] alpha, ld: remove -taso option
  2025-01-18 10:17     ` [PATCH v2] " Ivan Kokshaysky
@ 2025-01-20 17:50       ` Maciej W. Rozycki
       [not found]       ` <f203eaa7-41a5-4b87-80cc-ab0d0e2edd9c@redhat.com>
  2025-02-11 17:43       ` Andrew Burgess
  2 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2025-01-20 17:50 UTC (permalink / raw)
  To: Ivan Kokshaysky, Nick Clifton; +Cc: binutils, gdb-patches

On Sat, 18 Jan 2025, Ivan Kokshaysky wrote:

> The -taso switch was quite useful 25 years ago for porting 32-bit
> code with broken integer-pointer casting. Not anymore. The EF_ALPHA_32BIT
> Linux support is going to be dropped in kernel v6.14 [1], NetBSD and OpenBSD
> never had it, so there is no point in keeping the -taso option around.
> 
> Also remove alpha special case that uses -taso from gdb.base/dump.exp
> in gdb testsuite.
> 
> [1] https://lore.kernel.org/all/87jzb2tdb7.fsf_-_@email.froward.int.ebiederm.org
> 
> Signed-off-by: Ivan Kokshaysky <ink@unseen.parts>
> ---
> Changes in v2, suggested by Maciej W. Rozycki:
>   - leave the translations alone;
>   - remove OPTION_TASO from ld/ldlex.h;
>   - add entries to ld/NEWS and binutils/NEWS.

 I forgot we have per-tool-directory NEWS, so thanks for updating ld/NEWS 
and I think we don't want a duplicate entry in binutils/NEWS, which is for 
the other tools.  No need to send v3 I suppose, this can be fixed up at 
patch installation time.

 Your change looks good to me and I've run it through binutils regression 
testing, so as long as Nick is fine with it and someone on the GDB side 
acks the GDB test update I can install it for you once binutils 2.44 have 
been released in ~fortnight time.

  Maciej

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] alpha, ld: remove -taso option
       [not found]       ` <f203eaa7-41a5-4b87-80cc-ab0d0e2edd9c@redhat.com>
@ 2025-02-11 17:02         ` Maciej W. Rozycki
  0 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2025-02-11 17:02 UTC (permalink / raw)
  To: Nick Clifton; +Cc: ink, Binutils, gdb-patches

On Mon, 10 Feb 2025, Nick Clifton wrote:

> > The -taso switch was quite useful 25 years ago for porting 32-bit
> > code with broken integer-pointer casting. Not anymore. The EF_ALPHA_32BIT
> > Linux support is going to be dropped in kernel v6.14 [1], NetBSD and OpenBSD
> > never had it, so there is no point in keeping the -taso option around.
> 
> This part of your patch is approved.  Please apply it or ask someone to apply
> it for you.

 I'll do it once the GDB part has been approved, thanks for your review!

> > Also remove alpha special case that uses -taso from gdb.base/dump.exp
> > in gdb testsuite.
> 
> I cannot actually approve this part of the patch since it is for the GDB
> sources and
> not the binutils.  But I am sure that some kind GDB person will be happy to
> give it a
> review and approval.

 I cannot approve this part, but here's my:

Reviewed-by: Maciej W. Rozycki <macro@orcam.me.uk>

  Maciej

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] alpha, ld: remove -taso option
  2025-01-18 10:17     ` [PATCH v2] " Ivan Kokshaysky
  2025-01-20 17:50       ` Maciej W. Rozycki
       [not found]       ` <f203eaa7-41a5-4b87-80cc-ab0d0e2edd9c@redhat.com>
@ 2025-02-11 17:43       ` Andrew Burgess
  2025-02-15  1:36         ` Maciej W. Rozycki
  2 siblings, 1 reply; 11+ messages in thread
From: Andrew Burgess @ 2025-02-11 17:43 UTC (permalink / raw)
  To: Ivan Kokshaysky, Maciej W. Rozycki; +Cc: binutils, gdb-patches

Ivan Kokshaysky <ink@unseen.parts> writes:

> The -taso switch was quite useful 25 years ago for porting 32-bit
> code with broken integer-pointer casting. Not anymore. The EF_ALPHA_32BIT
> Linux support is going to be dropped in kernel v6.14 [1], NetBSD and OpenBSD
> never had it, so there is no point in keeping the -taso option around.
>
> Also remove alpha special case that uses -taso from gdb.base/dump.exp
> in gdb testsuite.

For the GDB testsuite change:

Approved-By: Andrew Burgess <aburgess@redhat.com>

Thanks,
Andrew


>
> [1] https://lore.kernel.org/all/87jzb2tdb7.fsf_-_@email.froward.int.ebiederm.org
>
> Signed-off-by: Ivan Kokshaysky <ink@unseen.parts>
> ---
> Changes in v2, suggested by Maciej W. Rozycki:
>   - leave the translations alone;
>   - remove OPTION_TASO from ld/ldlex.h;
>   - add entries to ld/NEWS and binutils/NEWS.
> ---
>  binutils/NEWS                   |  3 +++
>  gdb/testsuite/gdb.base/dump.exp |  6 ------
>  ld/NEWS                         |  3 +++
>  ld/emultempl/alphaelf.em        | 31 -------------------------------
>  ld/ldlex.h                      |  1 -
>  5 files changed, 6 insertions(+), 38 deletions(-)
>
> diff --git a/binutils/NEWS b/binutils/NEWS
> index f4687e6c2bc..9c1a54c9355 100644
> --- a/binutils/NEWS
> +++ b/binutils/NEWS
> @@ -1,5 +1,8 @@
>  -*- text -*-
>  
> +* Remove the linker -taso option for Alpha target, as Linux/Alpha kernel
> +  support for 32-bit pointers has been removed.
> +
>  * Support for Nios II targets has been removed except in the readelf utility,
>    as this architecture has been EOL'ed by Intel.
>  
> diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
> index 58fedb1d36b..54efe51fbaa 100644
> --- a/gdb/testsuite/gdb.base/dump.exp
> +++ b/gdb/testsuite/gdb.base/dump.exp
> @@ -26,12 +26,6 @@ set endian "auto"
>  
>  set formats {binary ihex srec tekhex  verilog}
>  
> -if {[istarget "alpha*-*-*"]} {
> -    # SREC etc cannot handle 64-bit addresses.  Force the test
> -    # program into the low 31 bits of the address space.
> -    lappend options "ldflags=-Wl,-taso"
> -}
> -
>  # Runs the command 'print zero_all ()'.  Uses the PRINT_ZERO_ALL_COUNT
>  # global to ensure the test names are unique.
>  set print_zero_all_count 0
> diff --git a/ld/NEWS b/ld/NEWS
> index aa3d3e83f35..ccdfc56ac84 100644
> --- a/ld/NEWS
> +++ b/ld/NEWS
> @@ -1,5 +1,8 @@
>  -*- text -*-
>  
> +* Remove the linker -taso option for Alpha target, as Linux/Alpha kernel
> +  support for 32-bit pointers has been removed.
> +
>  * Support for Nios II target has been removed, as this architecture has been
>    EOL'ed by Intel.
>  
> diff --git a/ld/emultempl/alphaelf.em b/ld/emultempl/alphaelf.em
> index 5ae2587a653..995d7f07a7f 100644
> --- a/ld/emultempl/alphaelf.em
> +++ b/ld/emultempl/alphaelf.em
> @@ -28,14 +28,8 @@ fragment <<EOF
>  #include "elf/alpha.h"
>  #include "elf-bfd.h"
>  
> -static bool limit_32bit;
> -
>  extern bool elf64_alpha_use_secureplt;
>  
> -
> -/* Set the start address as in the Tru64 ld.  */
> -#define ALPHA_TEXT_START_32BIT 0x12000000
> -
>  static void
>  alpha_after_open (void)
>  {
> @@ -73,14 +67,6 @@ static void
>  alpha_after_parse (void)
>  {
>    link_info.relax_pass = 2;
> -  if (limit_32bit
> -      && !bfd_link_pic (&link_info)
> -      && !bfd_link_relocatable (&link_info))
> -    lang_section_start (".interp",
> -			exp_binop ('+',
> -				   exp_intop (ALPHA_TEXT_START_32BIT),
> -				   exp_nameop (SIZEOF_HEADERS, NULL)),
> -			NULL);
>  
>    ldelf_after_parse ();
>  }
> @@ -97,40 +83,24 @@ alpha_before_allocation (void)
>        && ! RELAXATION_DISABLED_BY_USER)
>      ENABLE_RELAXATION;
>  }
> -
> -static void
> -alpha_finish (void)
> -{
> -  if (limit_32bit)
> -    elf_elfheader (link_info.output_bfd)->e_flags |= EF_ALPHA_32BIT;
> -
> -  ldelf_finish ();
> -}
>  EOF
>  
>  # Define some shell vars to insert bits of code into the standard elf
>  # parse_args and list_options functions.
>  #
>  PARSE_AND_LIST_LONGOPTS='
> -  { "taso", no_argument, NULL, OPTION_TASO },
>    { "secureplt", no_argument, NULL, OPTION_SECUREPLT },
>    { "no-secureplt", no_argument, NULL, OPTION_NO_SECUREPLT },
>  '
>  
>  PARSE_AND_LIST_OPTIONS='
>    fprintf (file, _("\
> -  --taso                      Load executable in the lower 31-bit addressable\n\
> -                                virtual address range\n"));
> -  fprintf (file, _("\
>    --secureplt                 Force PLT in text segment\n"));
>    fprintf (file, _("\
>    --no-secureplt              Force PLT in data segment\n"));
>  '
>  
>  PARSE_AND_LIST_ARGS_CASES='
> -    case OPTION_TASO:
> -      limit_32bit = 1;
> -      break;
>      case OPTION_SECUREPLT:
>        elf64_alpha_use_secureplt = true;
>        break;
> @@ -144,4 +114,3 @@ PARSE_AND_LIST_ARGS_CASES='
>  LDEMUL_AFTER_OPEN=alpha_after_open
>  LDEMUL_AFTER_PARSE=alpha_after_parse
>  LDEMUL_BEFORE_ALLOCATION=alpha_before_allocation
> -LDEMUL_FINISH=alpha_finish
> diff --git a/ld/ldlex.h b/ld/ldlex.h
> index b8b7d6b6829..999d0defc61 100644
> --- a/ld/ldlex.h
> +++ b/ld/ldlex.h
> @@ -246,7 +246,6 @@ enum option_values
>    OPTION_LIBPATH,
>    OPTION_NOLIBPATH,
>    /* Used by emultempl/alphaelf.em.  */
> -  OPTION_TASO,
>    OPTION_SECUREPLT,
>    OPTION_NO_SECUREPLT,
>    /* Used by emultempl/armelf.em.  */


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH v2] alpha, ld: remove -taso option
  2025-02-11 17:43       ` Andrew Burgess
@ 2025-02-15  1:36         ` Maciej W. Rozycki
  0 siblings, 0 replies; 11+ messages in thread
From: Maciej W. Rozycki @ 2025-02-15  1:36 UTC (permalink / raw)
  To: Andrew Burgess, Ivan Kokshaysky; +Cc: binutils, gdb-patches

On Tue, 11 Feb 2025, Andrew Burgess wrote:

> > The -taso switch was quite useful 25 years ago for porting 32-bit
> > code with broken integer-pointer casting. Not anymore. The EF_ALPHA_32BIT
> > Linux support is going to be dropped in kernel v6.14 [1], NetBSD and OpenBSD
> > never had it, so there is no point in keeping the -taso option around.
> >
> > Also remove alpha special case that uses -taso from gdb.base/dump.exp
> > in gdb testsuite.
> 
> For the GDB testsuite change:
> 
> Approved-By: Andrew Burgess <aburgess@redhat.com>

 Thank you for your review.  I have pushed this change on behalf of Ivan 
with the binutils/NEWS part duplicating ld/NEWS removed, as previously 
noted.

 Thank you, Ivan, for your contribution.

  Maciej

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2025-02-15  1:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Z4pr4tVtVYToa5YU@minute>
2025-01-17 14:47 ` [PATCH] alpha, ld: remove -taso option Sam James
2025-01-17 15:00   ` Ivan Kokshaysky
2025-01-17 21:17     ` Sam James
2025-01-18  7:33 ` Maciej W. Rozycki
2025-01-18  7:37   ` Maciej W. Rozycki
2025-01-18  8:40     ` Ivan Kokshaysky
2025-01-18 10:17     ` [PATCH v2] " Ivan Kokshaysky
2025-01-20 17:50       ` Maciej W. Rozycki
     [not found]       ` <f203eaa7-41a5-4b87-80cc-ab0d0e2edd9c@redhat.com>
2025-02-11 17:02         ` Maciej W. Rozycki
2025-02-11 17:43       ` Andrew Burgess
2025-02-15  1:36         ` Maciej W. Rozycki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox