[parisc-linux] simple testcase for binutils visibility problem

Randolph Chung Randolph Chung <randolph@tausq.org>
Mon, 11 Nov 2002 21:31:24 -0800


> > The fix is non-obvious to me. I have no idea where to begin here.
> > Any hints? :)
> 
> It isn't obvious to me either other than the problem is probably in
> elf32-hppa.c.  I would look at the testsuite results for ld, pick
> a simple test that fails and try to figure out what is going wrong.

here's a trivial test case in case anyone wants to track this down :-)

======= undef.s ==========
        .protected protected
        .hidden hidden
        .internal internal
==========================

assemble with 'as -o undef.o undef.s' and run 'readelf -s undef.o'

on pa, you get:
Symbol table '.symtab' contains 4 entries:
   Num:    Value  Size Type    Bind   Vis      Ndx Name
     0: 00000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 00000000     0 SECTION LOCAL  DEFAULT    1
     2: 00000000     0 SECTION LOCAL  DEFAULT    2
     3: 00000000     0 SECTION LOCAL  DEFAULT    3

on ia32/ia64, i get this more reasonable output:

Symbol table '.symtab' contains 7 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
     1: 0000000000000000     0 SECTION LOCAL  DEFAULT    1
     2: 0000000000000000     0 SECTION LOCAL  DEFAULT    2
     3: 0000000000000000     0 SECTION LOCAL  DEFAULT    3
     4: 0000000000000000     0 NOTYPE  GLOBAL PROTECTED  UND protected
     5: 0000000000000000     0 NOTYPE  GLOBAL HIDDEN  UND hidden
     6: 0000000000000000     0 NOTYPE  GLOBAL INTERNAL  UND internal

randolph
-- 
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/