* mips-elf regressions
@ 2008-10-08 8:28 Tristan Gingold
2008-10-08 8:49 ` Tristan Gingold
0 siblings, 1 reply; 9+ messages in thread
From: Tristan Gingold @ 2008-10-08 8:28 UTC (permalink / raw)
To: binutils
Hi,
there are many regressions on mips and I'd like this to be fixed
before doing the final release.
The analysis of one failure (localize-hidden-1) shows that the symtab
is not correctly ordered:
$ readelf -s tmpdir/bintest.o
Symbol table '.symtab' contains 18 entries:
Num: Value Size Type Bind Vis Ndx Name
0: 00000000 0 NOTYPE LOCAL DEFAULT UND
1: 00000000 0 SECTION LOCAL DEFAULT 1 .text
2: 00000000 0 SECTION LOCAL DEFAULT 2 .data
3: 00000000 0 SECTION LOCAL DEFAULT 3 .bss
4: 00000000 0 SECTION LOCAL DEFAULT 4 .reginfo
5: 00000000 0 SECTION LOCAL DEFAULT 5 .pdr
6: 00002100 0 OBJECT GLOBAL DEFAULT ABS Gdefault
7: 00002200 0 OBJECT GLOBAL HIDDEN ABS Ghidden
8: 00002300 0 OBJECT GLOBAL INTERNAL ABS Ginternal
9: 00002400 0 OBJECT GLOBAL PROTECTED ABS Gprotected
10: 00003100 0 NOTYPE WEAK DEFAULT ABS Wdefault
11: 00003200 0 NOTYPE WEAK HIDDEN ABS Whidden
12: 00003300 0 NOTYPE WEAK INTERNAL ABS Winternal
13: 00003400 0 NOTYPE WEAK PROTECTED ABS Wprotected
14: 00001200 0 NOTYPE LOCAL HIDDEN ABS Lhidden
15: 00001300 0 NOTYPE LOCAL INTERNAL ABS Linternal
16: 00001400 0 NOTYPE LOCAL PROTECTED ABS Lprotected
17: 00001100 0 NOTYPE LOCAL DEFAULT ABS Ldefault
(Locals must be before Weaks and Weaks must be before Globals
according to gabi).
As a consequence the output don't match the expected result.
I am now working on fixing this issue.
Tristan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 8:28 mips-elf regressions Tristan Gingold
@ 2008-10-08 8:49 ` Tristan Gingold
2008-10-08 10:01 ` Thiemo Seufer
2008-10-08 10:14 ` Alan Modra
0 siblings, 2 replies; 9+ messages in thread
From: Tristan Gingold @ 2008-10-08 8:49 UTC (permalink / raw)
To: binutils; +Cc: Tristan Gingold
On Oct 8, 2008, at 10:29 AM, Tristan Gingold wrote:
> (Locals must be before Weaks and Weaks must be before Globals
> according to gabi).
> As a consequence the output don't match the expected result.
Well according to elf32-mips.c, this is expected:
/* Determine whether a symbol is global for the purposes of splitting
the symbol table into global symbols and local symbols. At least
on Irix 5, this split must be between section symbols and all other
symbols. On most ELF targets the split is between static symbols
and externally visible symbols. */
static bfd_boolean
mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym)
{
if (SGI_COMPAT (abfd))
return (sym->flags & BSF_SECTION_SYM) == 0;
else
return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
|| bfd_is_und_section (bfd_get_section (sym))
|| bfd_is_com_section (bfd_get_section (sym)));
}
As SGI_COMPAT is true, this looks to be expected.
Can someone confirm this ?
If so, shouldn't we update the status of the failing tests (either
disabling them on mips-elf or marking
them as xfail) ?
Tristan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 8:49 ` Tristan Gingold
@ 2008-10-08 10:01 ` Thiemo Seufer
2008-10-08 15:01 ` Ian Lance Taylor
2008-10-08 10:14 ` Alan Modra
1 sibling, 1 reply; 9+ messages in thread
From: Thiemo Seufer @ 2008-10-08 10:01 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils
Tristan Gingold wrote:
>
> On Oct 8, 2008, at 10:29 AM, Tristan Gingold wrote:
>> (Locals must be before Weaks and Weaks must be before Globals
>> according to gabi).
>> As a consequence the output don't match the expected result.
>
> Well according to elf32-mips.c, this is expected:
>
> /* Determine whether a symbol is global for the purposes of splitting
> the symbol table into global symbols and local symbols. At least
> on Irix 5, this split must be between section symbols and all other
> symbols. On most ELF targets the split is between static symbols
> and externally visible symbols. */
>
> static bfd_boolean
> mips_elf_sym_is_global (bfd *abfd ATTRIBUTE_UNUSED, asymbol *sym)
> {
> if (SGI_COMPAT (abfd))
> return (sym->flags & BSF_SECTION_SYM) == 0;
> else
> return ((sym->flags & (BSF_GLOBAL | BSF_WEAK)) != 0
> || bfd_is_und_section (bfd_get_section (sym))
> || bfd_is_com_section (bfd_get_section (sym)));
> }
>
> As SGI_COMPAT is true, this looks to be expected.
>
> Can someone confirm this ?
This is correct. mips-elf uses the SGI-ish object layout with
nonstandard (or pre-standard?) symbol sorting.
> If so, shouldn't we update the status of the failing tests (either
> disabling them on mips-elf or marking
> them as xfail) ?
I think the test needs to check for different expected output for
mips-elf and mips-sgi-irix*
Thiemo
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 8:49 ` Tristan Gingold
2008-10-08 10:01 ` Thiemo Seufer
@ 2008-10-08 10:14 ` Alan Modra
2008-10-08 10:19 ` Tristan Gingold
2008-10-08 20:08 ` Maciej W. Rozycki
1 sibling, 2 replies; 9+ messages in thread
From: Alan Modra @ 2008-10-08 10:14 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils
On Wed, Oct 08, 2008 at 10:50:55AM +0200, Tristan Gingold wrote:
> On Oct 8, 2008, at 10:29 AM, Tristan Gingold wrote:
>> (Locals must be before Weaks and Weaks must be before Globals
>> according to gabi).
Not quite. Locals before others, weaks and globals are not ordered.
> As SGI_COMPAT is true, this looks to be expected.
>
> Can someone confirm this ?
Yes. Although I don't really see a need to break the ELF standard
when there are no global section symbols.
> If so, shouldn't we update the status of the failing tests (either
> disabling them on mips-elf or marking
> them as xfail) ?
xfail.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 10:14 ` Alan Modra
@ 2008-10-08 10:19 ` Tristan Gingold
2008-10-08 11:14 ` Alan Modra
2008-10-08 12:38 ` Maciej W. Rozycki
2008-10-08 20:08 ` Maciej W. Rozycki
1 sibling, 2 replies; 9+ messages in thread
From: Tristan Gingold @ 2008-10-08 10:19 UTC (permalink / raw)
To: Alan Modra; +Cc: binutils
On Oct 8, 2008, at 12:13 PM, Alan Modra wrote:
> On Wed, Oct 08, 2008 at 10:50:55AM +0200, Tristan Gingold wrote:
>> On Oct 8, 2008, at 10:29 AM, Tristan Gingold wrote:
>>> (Locals must be before Weaks and Weaks must be before Globals
>>> according to gabi).
>
> Not quite. Locals before others, weaks and globals are not ordered.
Right, I read too quickly.
>> As SGI_COMPAT is true, this looks to be expected.
>>
>> Can someone confirm this ?
>
> Yes. Although I don't really see a need to break the ELF standard
> when there are no global section symbols.
Aren't section symbols always local ? If so we could also classify
symbols
into section symbols, local and non-local (thought for a future
improvement).
>> If so, shouldn't we update the status of the failing tests (either
>> disabling them on mips-elf or marking
>> them as xfail) ?
>
> xfail.
Ok. Thank you for your quick reply.
Tristan.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 10:19 ` Tristan Gingold
@ 2008-10-08 11:14 ` Alan Modra
2008-10-08 12:38 ` Maciej W. Rozycki
1 sibling, 0 replies; 9+ messages in thread
From: Alan Modra @ 2008-10-08 11:14 UTC (permalink / raw)
To: Tristan Gingold; +Cc: binutils
On Wed, Oct 08, 2008 at 12:20:58PM +0200, Tristan Gingold wrote:
> Aren't section symbols always local ?
Usually, but the standard doesn't prohibit global section symbols.
See http://sourceware.org/ml/binutils/2005-07/msg00494.html
> If so we could also classify symbols
> into section symbols, local and non-local (thought for a future
> improvement).
Yes, for standard ELF:
local section, local, all others
For Irix compat:
local section, global section, local, all others.
--
Alan Modra
Australia Development Lab, IBM
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 10:19 ` Tristan Gingold
2008-10-08 11:14 ` Alan Modra
@ 2008-10-08 12:38 ` Maciej W. Rozycki
1 sibling, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2008-10-08 12:38 UTC (permalink / raw)
To: Tristan Gingold; +Cc: Alan Modra, binutils
On Wed, 8 Oct 2008, Tristan Gingold wrote:
> > > As SGI_COMPAT is true, this looks to be expected.
> > >
> > > Can someone confirm this ?
> >
> > Yes. Although I don't really see a need to break the ELF standard
> > when there are no global section symbols.
>
> Aren't section symbols always local ? If so we could also classify symbols
> into section symbols, local and non-local (thought for a future improvement).
They are, but for SGI_COMPAT non-section symbols are always external,
which is not always true for "traditional" targets. There's been
something subtle about it I don't recall exactly anymore, but you should
be able to track it down by chasing the discussion around the change to
BFD that introduced the distinction and/or scanning the sources for other
IRIX 5 conditionals. I think this is something about one of the DYNAMIC
entries being interpreted by IRIX in such a way that it prevents the use
of a linker script to force symbols local at the static link time. Which
the GNU C library depends on heavily.
Maciej
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 10:01 ` Thiemo Seufer
@ 2008-10-08 15:01 ` Ian Lance Taylor
0 siblings, 0 replies; 9+ messages in thread
From: Ian Lance Taylor @ 2008-10-08 15:01 UTC (permalink / raw)
To: Thiemo Seufer; +Cc: binutils
Thiemo Seufer <ths@networkno.de> writes:
> This is correct. mips-elf uses the SGI-ish object layout with
> nonstandard (or pre-standard?) symbol sorting.
Nonstandard, even then. It was a (possibly unintended) consequence of
SGI hacking their ECOFF linker to generate ELF.
Ian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: mips-elf regressions
2008-10-08 10:14 ` Alan Modra
2008-10-08 10:19 ` Tristan Gingold
@ 2008-10-08 20:08 ` Maciej W. Rozycki
1 sibling, 0 replies; 9+ messages in thread
From: Maciej W. Rozycki @ 2008-10-08 20:08 UTC (permalink / raw)
To: Alan Modra; +Cc: Tristan Gingold, binutils
On Wed, 8 Oct 2008, Alan Modra wrote:
> > As SGI_COMPAT is true, this looks to be expected.
> >
> > Can someone confirm this ?
>
> Yes. Although I don't really see a need to break the ELF standard
> when there are no global section symbols.
SGI_COMPAT is *the* ELF standard for MIPS per the psABI supplement.
Unfortunately it's incompatible with the requirements of the GNU C
library, which is why the "traditional" variation has been created around
the time glibc 2.2 was released. The incompatibility was the main reason
there has never been glibc 2.1 for MIPS/Linux.
Maciej
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2008-10-08 20:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-08 8:28 mips-elf regressions Tristan Gingold
2008-10-08 8:49 ` Tristan Gingold
2008-10-08 10:01 ` Thiemo Seufer
2008-10-08 15:01 ` Ian Lance Taylor
2008-10-08 10:14 ` Alan Modra
2008-10-08 10:19 ` Tristan Gingold
2008-10-08 11:14 ` Alan Modra
2008-10-08 12:38 ` Maciej W. Rozycki
2008-10-08 20:08 ` 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).