* [PATCH] Fix bfd ABI string for MIPS
@ 2001-08-15 14:40 Thiemo Seufer
2001-08-16 9:26 ` Eric Christopher
0 siblings, 1 reply; 8+ messages in thread
From: Thiemo Seufer @ 2001-08-15 14:40 UTC (permalink / raw)
To: binutils
Hi All,
currently bfd returns for the MIPS ABI string "N32" for every ELF
object with header flag EF_MIPS_ABI2 set and "64" for every ELF
object which is 64bit.
This means E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64 are named wrongly
as "64", and an object with EF_MIPS_ABI2 and arbitrary other flags
set is also wrongly called "N32".
The patch below fixes this.
Thiemo
2001-08-16 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
/bfd/ChangeLog
* elf32-mips.c (elf_mips_abi_name): Return the right ABI string for
E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64
diff -BurPX /bigdisk/dl/src/binutils-exclude src-orig/bfd/elf32-mips.c src/bfd/elf32-mips.c
--- src-orig/bfd/elf32-mips.c Mon Jun 18 21:48:24 2001
+++ src/bfd/elf32-mips.c Thu Jun 21 07:45:18 2001
@@ -1928,16 +1928,16 @@
{
flagword flags;
- if (ABI_N32_P (abfd))
- return "N32";
- else if (ABI_64_P (abfd))
- return "64";
-
flags = elf_elfheader (abfd)->e_flags;
switch (flags & EF_MIPS_ABI)
{
case 0:
- return "none";
+ if (ABI_N32_P (abfd))
+ return "N32";
+ else if (ABI_64_P (abfd))
+ return "64";
+ else
+ return "none";
case E_MIPS_ABI_O32:
return "O32";
case E_MIPS_ABI_O64:
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix bfd ABI string for MIPS
2001-08-15 14:40 [PATCH] Fix bfd ABI string for MIPS Thiemo Seufer
@ 2001-08-16 9:26 ` Eric Christopher
2001-08-16 9:41 ` Andrew Cagney
0 siblings, 1 reply; 8+ messages in thread
From: Eric Christopher @ 2001-08-16 9:26 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils
On 16 Aug 2001 03:41:48 +0200, Thiemo Seufer wrote:
> Hi All,
>
> currently bfd returns for the MIPS ABI string "N32" for every ELF
> object with header flag EF_MIPS_ABI2 set and "64" for every ELF
> object which is 64bit.
>
> This means E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64 are named wrongly
> as "64", and an object with EF_MIPS_ABI2 and arbitrary other flags
> set is also wrongly called "N32".
>
> The patch below fixes this.
>
>
I think this may have side effects. How did you test this? gcc and gdb?
-eric
--
Look out behind you!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix bfd ABI string for MIPS
2001-08-16 9:26 ` Eric Christopher
@ 2001-08-16 9:41 ` Andrew Cagney
[not found] ` <20010816200837.W381@rembrandt.csv.ica.uni-stu>
2001-08-16 11:10 ` Thiemo Seufer
0 siblings, 2 replies; 8+ messages in thread
From: Andrew Cagney @ 2001-08-16 9:41 UTC (permalink / raw)
To: Eric Christopher; +Cc: Thiemo Seufer, binutils
> On 16 Aug 2001 03:41:48 +0200, Thiemo Seufer wrote:
>
>> Hi All,
>>
>> currently bfd returns for the MIPS ABI string "N32" for every ELF
>> object with header flag EF_MIPS_ABI2 set and "64" for every ELF
>> object which is 64bit.
>>
>> This means E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64 are named wrongly
>> as "64", and an object with EF_MIPS_ABI2 and arbitrary other flags
>> set is also wrongly called "N32".
>>
>> The patch below fixes this.
>>
>>
>
>
> I think this may have side effects. How did you test this? gcc and gdb?
>
> -eric
>
Yes, I wondered the same thing. Here, I think it doesn't have an effect
on GDB. GDB grubs aound in the bits in the elf header when determining
the ABI. However, caution is definitly advised.
Andrew
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <20010816200837.W381@rembrandt.csv.ica.uni-stu>]
* Re: [PATCH] Fix bfd ABI string for MIPS
2001-08-16 9:41 ` Andrew Cagney
[not found] ` <20010816200837.W381@rembrandt.csv.ica.uni-stu>
@ 2001-08-16 11:10 ` Thiemo Seufer
2001-08-24 11:57 ` Thiemo Seufer
1 sibling, 1 reply; 8+ messages in thread
From: Thiemo Seufer @ 2001-08-16 11:10 UTC (permalink / raw)
To: binutils
Andrew Cagney wrote:
> > On 16 Aug 2001 03:41:48 +0200, Thiemo Seufer wrote:
> >
> >> Hi All,
> >>
> >> currently bfd returns for the MIPS ABI string "N32" for every ELF
> >> object with header flag EF_MIPS_ABI2 set and "64" for every ELF
> >> object which is 64bit.
First of all, sorry for this bad description. It's not that bfd
returns this string to an client, it's use is internal to
elf32-mips.c. Having a closer look, it's in fact only used for
an error message about modules with incompatible ABI.
> >> This means E_MIPS_ABI_O64 and E_MIPS_ABI_EABI64 are named wrongly
> >> as "64", and an object with EF_MIPS_ABI2 and arbitrary other flags
> >> set is also wrongly called "N32".
> >>
> >> The patch below fixes this.
> >
> > I think this may have side effects. How did you test this? gcc and gdb?
> >
> > -eric
> >
>
> Yes, I wondered the same thing. Here, I think it doesn't have an effect
> on GDB. GDB grubs aound in the bits in the elf header when determining
> the ABI. However, caution is definitly advised.
Sorry again. It definitely has no side effect except of putting out
the correct ABI names in the error message.
Thiemo
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix bfd ABI string for MIPS
2001-08-16 11:10 ` Thiemo Seufer
@ 2001-08-24 11:57 ` Thiemo Seufer
2001-08-24 13:25 ` Eric Christopher
0 siblings, 1 reply; 8+ messages in thread
From: Thiemo Seufer @ 2001-08-24 11:57 UTC (permalink / raw)
To: binutils
Thiemo Seufer wrote:
[snip]
> > > I think this may have side effects. How did you test this? gcc and gdb?
> > >
> > > -eric
> > >
> >
> > Yes, I wondered the same thing. Here, I think it doesn't have an effect
> > on GDB. GDB grubs aound in the bits in the elf header when determining
> > the ABI. However, caution is definitly advised.
>
> Sorry again. It definitely has no side effect except of putting out
> the correct ABI names in the error message.
I'll check this in if there are no objections.
Thiemo
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2001-08-24 13:43 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-15 14:40 [PATCH] Fix bfd ABI string for MIPS Thiemo Seufer
2001-08-16 9:26 ` Eric Christopher
2001-08-16 9:41 ` Andrew Cagney
[not found] ` <20010816200837.W381@rembrandt.csv.ica.uni-stu>
2001-08-16 11:10 ` Thiemo Seufer
2001-08-24 11:57 ` Thiemo Seufer
2001-08-24 13:25 ` Eric Christopher
2001-08-24 13:39 ` Andrew Cagney
2001-08-24 13:43 ` Eric Christopher
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).