public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* testsuites: how to match something or no_this_line
@ 2023-05-09  6:16 YunQiang Su
  2023-05-09  6:44 ` YunQiang Su
  2023-05-09  7:48 ` Andreas Schwab
  0 siblings, 2 replies; 5+ messages in thread
From: YunQiang Su @ 2023-05-09  6:16 UTC (permalink / raw)
  To: binutils

I am working on binutils testsuites, and I find that I need to do so.

An example is like this: <gas/testsuite/gas/all/fwdexp.d>
The MIPS n64 has different relocation type like:

RELOCATION RECORDS FOR [.text]:
OFFSET           TYPE              VALUE
0000000000000000 R_MIPS_64         .data-0x0000000000000008
0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008

While normally, for other ports, it like

RELOCATION RECORDS FOR [.text]:
OFFSET   TYPE              VALUE
00000000 R_MIPS_32         .data

Maybe I can sed out R_MIPS_NONE, but I don't know how to do so either.

-- 
YunQiang Su

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

* Re: testsuites: how to match something or no_this_line
  2023-05-09  6:16 testsuites: how to match something or no_this_line YunQiang Su
@ 2023-05-09  6:44 ` YunQiang Su
  2023-05-09  7:48 ` Andreas Schwab
  1 sibling, 0 replies; 5+ messages in thread
From: YunQiang Su @ 2023-05-09  6:44 UTC (permalink / raw)
  To: binutils

YunQiang Su <wzssyqa@gmail.com> 于2023年5月9日周二 14:16写道:
>
> I am working on binutils testsuites, and I find that I need to do so.
>
> An example is like this: <gas/testsuite/gas/all/fwdexp.d>
> The MIPS n64 has different relocation type like:
>

Sorry for the noisy: by reading the code of binutils-common.exp, I find
     #?EXP
can work.

> RELOCATION RECORDS FOR [.text]:
> OFFSET           TYPE              VALUE
> 0000000000000000 R_MIPS_64         .data-0x0000000000000008
> 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
> 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
>
> While normally, for other ports, it like
>
> RELOCATION RECORDS FOR [.text]:
> OFFSET   TYPE              VALUE
> 00000000 R_MIPS_32         .data
>
> Maybe I can sed out R_MIPS_NONE, but I don't know how to do so either.
>
> --
> YunQiang Su



-- 
YunQiang Su

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

* Re: testsuites: how to match something or no_this_line
  2023-05-09  6:16 testsuites: how to match something or no_this_line YunQiang Su
  2023-05-09  6:44 ` YunQiang Su
@ 2023-05-09  7:48 ` Andreas Schwab
  2023-05-09  8:01   ` YunQiang Su
  2023-05-09  8:32   ` Alan Modra
  1 sibling, 2 replies; 5+ messages in thread
From: Andreas Schwab @ 2023-05-09  7:48 UTC (permalink / raw)
  To: YunQiang Su via Binutils; +Cc: YunQiang Su

On Mai 09 2023, YunQiang Su via Binutils wrote:

> An example is like this: <gas/testsuite/gas/all/fwdexp.d>
> The MIPS n64 has different relocation type like:
>
> RELOCATION RECORDS FOR [.text]:
> OFFSET           TYPE              VALUE
> 0000000000000000 R_MIPS_64         .data-0x0000000000000008
> 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
> 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
>
> While normally, for other ports, it like
>
> RELOCATION RECORDS FOR [.text]:
> OFFSET   TYPE              VALUE
> 00000000 R_MIPS_32         .data
>
> Maybe I can sed out R_MIPS_NONE, but I don't know how to do so either.

It's really a bug in the mips backend, nothing should ever emit R_*_NONE
relocations.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."

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

* Re: testsuites: how to match something or no_this_line
  2023-05-09  7:48 ` Andreas Schwab
@ 2023-05-09  8:01   ` YunQiang Su
  2023-05-09  8:32   ` Alan Modra
  1 sibling, 0 replies; 5+ messages in thread
From: YunQiang Su @ 2023-05-09  8:01 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: YunQiang Su via Binutils

Andreas Schwab <schwab@suse.de> 于2023年5月9日周二 15:48写道:
>
> On Mai 09 2023, YunQiang Su via Binutils wrote:
>
> > An example is like this: <gas/testsuite/gas/all/fwdexp.d>
> > The MIPS n64 has different relocation type like:
> >
> > RELOCATION RECORDS FOR [.text]:
> > OFFSET           TYPE              VALUE
> > 0000000000000000 R_MIPS_64         .data-0x0000000000000008
> > 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
> > 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
> >
> > While normally, for other ports, it like
> >
> > RELOCATION RECORDS FOR [.text]:
> > OFFSET   TYPE              VALUE
> > 00000000 R_MIPS_32         .data
> >
> > Maybe I can sed out R_MIPS_NONE, but I don't know how to do so either.
>
> It's really a bug in the mips backend, nothing should ever emit R_*_NONE
> relocations.
>

In fact it is a "feature" of MIPS's ELF64.
It is called chained relocations or relocation chain.

> --
> Andreas Schwab, SUSE Labs, schwab@suse.de
> GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
> "And now for something completely different."



-- 
YunQiang Su

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

* Re: testsuites: how to match something or no_this_line
  2023-05-09  7:48 ` Andreas Schwab
  2023-05-09  8:01   ` YunQiang Su
@ 2023-05-09  8:32   ` Alan Modra
  1 sibling, 0 replies; 5+ messages in thread
From: Alan Modra @ 2023-05-09  8:32 UTC (permalink / raw)
  To: Andreas Schwab; +Cc: YunQiang Su via Binutils, YunQiang Su

On Tue, May 09, 2023 at 09:48:26AM +0200, Andreas Schwab via Binutils wrote:
> On Mai 09 2023, YunQiang Su via Binutils wrote:
> 
> > An example is like this: <gas/testsuite/gas/all/fwdexp.d>
> > The MIPS n64 has different relocation type like:
> >
> > RELOCATION RECORDS FOR [.text]:
> > OFFSET           TYPE              VALUE
> > 0000000000000000 R_MIPS_64         .data-0x0000000000000008
> > 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
> > 0000000000000000 R_MIPS_NONE       *ABS*-0x0000000000000008
> >
> > While normally, for other ports, it like
> >
> > RELOCATION RECORDS FOR [.text]:
> > OFFSET   TYPE              VALUE
> > 00000000 R_MIPS_32         .data
> >
> > Maybe I can sed out R_MIPS_NONE, but I don't know how to do so either.
> 
> It's really a bug in the mips backend, nothing should ever emit R_*_NONE
> relocations.

No, see include/elf/mips.h Elf64_Mips_External_Rel.

-- 
Alan Modra
Australia Development Lab, IBM

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

end of thread, other threads:[~2023-05-09  8:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-09  6:16 testsuites: how to match something or no_this_line YunQiang Su
2023-05-09  6:44 ` YunQiang Su
2023-05-09  7:48 ` Andreas Schwab
2023-05-09  8:01   ` YunQiang Su
2023-05-09  8:32   ` Alan Modra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).