public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* ld bug?
@ 2001-10-29 14:35 Vassili Karpov
  2001-10-30 23:30 ` H . J . Lu
  0 siblings, 1 reply; 13+ messages in thread
From: Vassili Karpov @ 2001-10-29 14:35 UTC (permalink / raw)
  To: binutils

LD discards ELF visibility attributes when making relocateable objects.

Example:
a.s
==
.protected symbol

b.s
==
dummy:
---
as -o a.o a.s
as -o b.o b.s
ld -r -o c.o a.o b.o

a.o:     4: 00000000     0 NOTYPE  GLOBAL PROTECTED  UND symbol
c.o:     8: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND symbol
-- 
mailto:malc@pulsesoft.com

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

* Re: ld bug?
  2001-10-29 14:35 ld bug? Vassili Karpov
@ 2001-10-30 23:30 ` H . J . Lu
  2001-10-30 23:33   ` H . J . Lu
  0 siblings, 1 reply; 13+ messages in thread
From: H . J . Lu @ 2001-10-30 23:30 UTC (permalink / raw)
  To: Vassili Karpov; +Cc: binutils

On Tue, Oct 30, 2001 at 01:36:04AM +0300, Vassili Karpov wrote:
> LD discards ELF visibility attributes when making relocateable objects.
> 
> Example:
> a.s
> ==
> .protected symbol
> 
> b.s
> ==
> dummy:
> ---
> as -o a.o a.s
> as -o b.o b.s
> ld -r -o c.o a.o b.o
> 
> a.o:     4: 00000000     0 NOTYPE  GLOBAL PROTECTED  UND symbol
> c.o:     8: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND symbol
> -- 

It is ok since symbol is undefined. There is no such a thing as
protected, undefined symbol.


H.J.

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

* Re: ld bug?
  2001-10-30 23:30 ` H . J . Lu
@ 2001-10-30 23:33   ` H . J . Lu
  2001-10-30 23:42     ` H . J . Lu
  0 siblings, 1 reply; 13+ messages in thread
From: H . J . Lu @ 2001-10-30 23:33 UTC (permalink / raw)
  To: Vassili Karpov; +Cc: binutils

On Tue, Oct 30, 2001 at 11:30:13PM -0800, H . J . Lu wrote:
> On Tue, Oct 30, 2001 at 01:36:04AM +0300, Vassili Karpov wrote:
> > LD discards ELF visibility attributes when making relocateable objects.
> > 
> > Example:
> > a.s
> > ==
> > .protected symbol
> > 
> > b.s
> > ==
> > dummy:
> > ---
> > as -o a.o a.s
> > as -o b.o b.s
> > ld -r -o c.o a.o b.o
> > 
> > a.o:     4: 00000000     0 NOTYPE  GLOBAL PROTECTED  UND symbol
> > c.o:     8: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND symbol
> > -- 
> 
> It is ok since symbol is undefined. There is no such a thing as
> protected, undefined symbol.

I take it back. It is a bug. I will fix it.


H.J.

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

* Re: ld bug?
  2001-10-30 23:33   ` H . J . Lu
@ 2001-10-30 23:42     ` H . J . Lu
  2001-10-31  6:27       ` Nick Clifton
  0 siblings, 1 reply; 13+ messages in thread
From: H . J . Lu @ 2001-10-30 23:42 UTC (permalink / raw)
  To: Vassili Karpov; +Cc: binutils

On Tue, Oct 30, 2001 at 11:33:09PM -0800, H . J . Lu wrote:
> On Tue, Oct 30, 2001 at 11:30:13PM -0800, H . J . Lu wrote:
> > On Tue, Oct 30, 2001 at 01:36:04AM +0300, Vassili Karpov wrote:
> > > LD discards ELF visibility attributes when making relocateable objects.
> > > 
> > > Example:
> > > a.s
> > > ==
> > > .protected symbol
> > > 
> > > b.s
> > > ==
> > > dummy:
> > > ---
> > > as -o a.o a.s
> > > as -o b.o b.s
> > > ld -r -o c.o a.o b.o
> > > 
> > > a.o:     4: 00000000     0 NOTYPE  GLOBAL PROTECTED  UND symbol
> > > c.o:     8: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND symbol
> > > -- 
> > 
> > It is ok since symbol is undefined. There is no such a thing as
> > protected, undefined symbol.
> 
> I take it back. It is a bug. I will fix it.
> 
> 

Here it is.


H.J.
---
2001-10-30  H.J. Lu <hjl@gnu.org>

	* elflink.h (elf_link_output_extsym): Don't clear the visibility
	field for relocateable.

Index: elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.87
diff -u -p -r1.87 elflink.h
--- elflink.h	2001/10/28 17:38:27	1.87
+++ elflink.h	2001/10/31 07:40:35
@@ -5877,7 +5877,8 @@ elf_link_output_extsym (h, data)
 
   /* If a symbol is not defined locally, we clear the visibility
      field.  */
-  if ((h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
+  if (! finfo->info->relocateable
+      && (h->elf_link_hash_flags & ELF_LINK_HASH_DEF_REGULAR) == 0)
     sym.st_other ^= ELF_ST_VISIBILITY (sym.st_other);
 
   /* If this symbol should be put in the .dynsym section, then put it

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

* Re: ld bug?
  2001-10-30 23:42     ` H . J . Lu
@ 2001-10-31  6:27       ` Nick Clifton
       [not found]         ` <mailpost.1004538510.13276@postal.sibyte.com>
  0 siblings, 1 reply; 13+ messages in thread
From: Nick Clifton @ 2001-10-31  6:27 UTC (permalink / raw)
  To: H . J . Lu; +Cc: Vassili Karpov, binutils

Hi H.J.

> 2001-10-30  H.J. Lu <hjl@gnu.org>
> 
> 	* elflink.h (elf_link_output_extsym): Don't clear the visibility
> 	field for relocateable.

Approved.

Cheers
        Nick

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

* PATCH: Add the "ld -r" test for ELF visibility.
       [not found]           ` <yov5wv1bpxbb.fsf@broadcom.com>
@ 2001-10-31 10:37             ` H . J . Lu
  2001-10-31 11:12               ` Hans-Peter Nilsson
  0 siblings, 1 reply; 13+ messages in thread
From: H . J . Lu @ 2001-10-31 10:37 UTC (permalink / raw)
  To: cgd; +Cc: nickc, binutils

On Wed, Oct 31, 2001 at 08:51:36AM -0800, cgd@broadcom.com wrote:
> nickc@cambridge.redhat.com ("Nick Clifton") writes:
> > > 2001-10-30  H.J. Lu <hjl@gnu.org>
> > > 
> > > 	* elflink.h (elf_link_output_extsym): Don't clear the visibility
> > > 	field for relocateable.
> > 
> > Approved.
> 
> So, shouldn't we even _try_ to add test cases to the ld testsuite to
> handle things like this?
> 

Here is the new test.


H.J.
----
2001-10-31  H.J. Lu  <hjl@gnu.org>

	* ld-elfvsb/elfvsb.exp: Add the "ld -r" test.

	* ld-elfvsb/visibility.s: New.

--- ld-elfvsb/elfvsb.exp.vsb	Wed Jun  6 15:07:50 2001
+++ ld-elfvsb/elfvsb.exp	Wed Oct 31 10:29:04 2001
@@ -42,6 +42,39 @@ if { [istarget *-*-linux*aout*] \
     return
 }
 
+if { ![ld_assemble $as $srcdir/$subdir/visibility.s tmpdir/visibility.o]
+     || ![ld_simple_link $ld tmpdir/relocateable.o "-r tmpdir/visibility.o"] } {
+    unresolved "visibility relocateable"
+} else {
+    global READELF
+
+    catch "exec $READELF -s tmpdir/relocateable.o > tmpdir/relocateable.output" got
+    if ![string match "" $got] then {
+	send_log "$got\n"
+	verbose "$got"
+	fail "visibility relocateable"
+    } else {
+	catch "exec grep protected tmpdir/relocateable.output | grep PROTECTED" got
+	if [regexp "PROTECTED" $got] then {
+	    pass "visibility relocateable (protected)"
+	} else {
+	    fail "visibility relocateable (protected)"
+	}
+	catch "exec grep hidden tmpdir/relocateable.output | grep HIDDEN" got
+	if [regexp "HIDDEN" $got] then {
+	    pass "visibility relocateable (hidden)"
+	} else {
+	    fail "visibility relocateable (hidden)"
+	}
+	catch "exec grep internal tmpdir/relocateable.output | grep INTERNAL" got
+	if [regexp "INTERNAL" $got] then {
+	    pass "visibility relocateable (internal)"
+	} else {
+	    fail "visibility relocateable (internal)"
+	}
+    }
+}
+
 set tmpdir tmpdir
 set SHCFLAG ""
 
--- ld-elfvsb/visibility.s.vsb	Wed Oct 31 09:17:47 2001
+++ ld-elfvsb/visibility.s	Wed Oct 31 09:18:16 2001
@@ -0,0 +1,3 @@
+	.protected protected
+	.hidden hidden
+	.internal internal

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 10:37             ` PATCH: Add the "ld -r" test for ELF visibility H . J . Lu
@ 2001-10-31 11:12               ` Hans-Peter Nilsson
  2001-10-31 12:07                 ` H . J . Lu
  2001-10-31 13:20                 ` H . J . Lu
  0 siblings, 2 replies; 13+ messages in thread
From: Hans-Peter Nilsson @ 2001-10-31 11:12 UTC (permalink / raw)
  To: H . J . Lu; +Cc: cgd, nickc, binutils

On Wed, 31 Oct 2001, H . J . Lu wrote:
> Here is the new test.
>
> 	* ld-elfvsb/elfvsb.exp: Add the "ld -r" test.
>
> 	* ld-elfvsb/visibility.s: New.

This looks like it could use the run_dump_test framework. See
ld-linkonce for an example (change "objdump" to "readelf", and
weed out everything but the HIDDEN and PROTECTED lines with #...
and #pass).  Much less footwork per test.

brgds, H-P

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 11:12               ` Hans-Peter Nilsson
@ 2001-10-31 12:07                 ` H . J . Lu
  2001-10-31 13:20                 ` H . J . Lu
  1 sibling, 0 replies; 13+ messages in thread
From: H . J . Lu @ 2001-10-31 12:07 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: cgd, nickc, binutils

On Wed, Oct 31, 2001 at 02:12:10PM -0500, Hans-Peter Nilsson wrote:
> On Wed, 31 Oct 2001, H . J . Lu wrote:
> > Here is the new test.
> >
> > 	* ld-elfvsb/elfvsb.exp: Add the "ld -r" test.
> >
> > 	* ld-elfvsb/visibility.s: New.
> 
> This looks like it could use the run_dump_test framework. See
> ld-linkonce for an example (change "objdump" to "readelf", and
> weed out everything but the HIDDEN and PROTECTED lines with #...
> and #pass).  Much less footwork per test.
> 

I am not sure if it will work too well in this case. The problem is I don't
care the exact output. I only look for

     7: 00000000     0 NOTYPE  GLOBAL HIDDEN  UND hidden
     8: 00000000     0 NOTYPE  GLOBAL INTERNAL  UND internal
     9: 00000000     0 NOTYPE  GLOBAL PROTECTED  UND protected

Different targets may have different indexes and additional informations.
How do I filter them out?


H.J.

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 11:12               ` Hans-Peter Nilsson
  2001-10-31 12:07                 ` H . J . Lu
@ 2001-10-31 13:20                 ` H . J . Lu
  2001-10-31 13:31                   ` Hans-Peter Nilsson
  1 sibling, 1 reply; 13+ messages in thread
From: H . J . Lu @ 2001-10-31 13:20 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: cgd, nickc, binutils

On Wed, Oct 31, 2001 at 02:12:10PM -0500, Hans-Peter Nilsson wrote:
> On Wed, 31 Oct 2001, H . J . Lu wrote:
> > Here is the new test.
> >
> > 	* ld-elfvsb/elfvsb.exp: Add the "ld -r" test.
> >
> > 	* ld-elfvsb/visibility.s: New.
> 
> This looks like it could use the run_dump_test framework. See
> ld-linkonce for an example (change "objdump" to "readelf", and
> weed out everything but the HIDDEN and PROTECTED lines with #...
> and #pass).  Much less footwork per test.
> 

How about this patch? Tested on Linux/x86 and Linux/alpha.


H.J.
----
--- ld-elfvsb/define.d.vsb	Wed Oct 31 12:39:27 2001
+++ ld-elfvsb/define.d	Wed Oct 31 13:14:16 2001
@@ -0,0 +1,13 @@
+#source: undef.s
+#source: define.s
+#ld: -r
+#readelf: -s
+#target: *-*-*
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN    . hidden
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL INTERNAL    . internal
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED    . protected
+#...
--- ld-elfvsb/define.s.vsb	Wed Oct 31 12:39:24 2001
+++ ld-elfvsb/define.s	Wed Oct 31 12:39:07 2001
@@ -0,0 +1,6 @@
+	.globl protected
+protected:
+	.globl hidden
+hidden:
+	.globl internal
+internal:
--- ld-elfvsb/elfvsb.exp.vsb	Wed Jun  6 15:07:50 2001
+++ ld-elfvsb/elfvsb.exp	Wed Oct 31 12:04:59 2001
@@ -42,6 +42,13 @@ if { [istarget *-*-linux*aout*] \
     return
 }
 
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
+foreach t $test_list {
+    # We need to strip the ".d", but can leave the dirname.
+    verbose [file rootname $t]
+    run_dump_test [file rootname $t]
+}
+
 set tmpdir tmpdir
 set SHCFLAG ""
 
--- ld-elfvsb/undef.d.vsb	Wed Oct 31 11:49:47 2001
+++ ld-elfvsb/undef.d	Wed Oct 31 13:14:27 2001
@@ -0,0 +1,12 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+#target: *-*-*
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN  UND hidden
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL INTERNAL  UND internal
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED  UND protected
+#...
--- ld-elfvsb/undef.s.vsb	Wed Oct 31 11:47:24 2001
+++ ld-elfvsb/undef.s	Wed Oct 31 11:47:24 2001
@@ -0,0 +1,3 @@
+	.protected protected
+	.hidden hidden
+	.internal internal

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 13:20                 ` H . J . Lu
@ 2001-10-31 13:31                   ` Hans-Peter Nilsson
  2001-10-31 13:35                     ` cgd
  2001-10-31 13:53                     ` H . J . Lu
  0 siblings, 2 replies; 13+ messages in thread
From: Hans-Peter Nilsson @ 2001-10-31 13:31 UTC (permalink / raw)
  To: H . J . Lu; +Cc: cgd, nickc, binutils

On Wed, 31 Oct 2001, H . J . Lu wrote:
> How about this patch? Tested on Linux/x86 and Linux/alpha.

That's what I was thinking of, except (for both tests)...

> +#target: *-*-*

The target-specifier is optional; you don't need it for *-*-*.

> +     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED    . protected
> +#...

Not sure why I think so, but I think the last "#..." should
better be "#pass".  Perhaps it's because things then look a bit
clearer when the test fails.

Another caveat is that the order of the symbols might change,
the test fail, but the output still be valid.  Perhaps different
tests, each selecting one line, if it's important.

brgds, H-P

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 13:31                   ` Hans-Peter Nilsson
@ 2001-10-31 13:35                     ` cgd
  2001-10-31 13:53                     ` H . J . Lu
  1 sibling, 0 replies; 13+ messages in thread
From: cgd @ 2001-10-31 13:35 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: hjl, binutils

"Hans-Peter Nilsson" <hp@bitrange.com> writes:
> > +     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED    . protected
> > +#...
> 
> Not sure why I think so, but I think the last "#..." should
> better be "#pass".  Perhaps it's because things then look a bit
> clearer when the test fails.

Actually, currently, AFAIK, a trailing #... at end of file _doesn't_
match additional output in the objdump dump output.

(I posted a patch to make it so, it was quasi-approved, but I didn't
get around to applying it... and now that i know about #pass I don't
know that it's really a good idea.)


Also, e.g. for:

     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN    . hidden

I think i'd suggest:

 +[0-9]+: [0-9a-fA-F]+     0 NOTYPE  GLOBAL HIDDEN +[0-9]+ hidden

(more tolerant of different section numbers)



chris

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 13:31                   ` Hans-Peter Nilsson
  2001-10-31 13:35                     ` cgd
@ 2001-10-31 13:53                     ` H . J . Lu
  2001-10-31 15:09                       ` Hans-Peter Nilsson
  1 sibling, 1 reply; 13+ messages in thread
From: H . J . Lu @ 2001-10-31 13:53 UTC (permalink / raw)
  To: Hans-Peter Nilsson; +Cc: cgd, nickc, binutils

On Wed, Oct 31, 2001 at 04:31:13PM -0500, Hans-Peter Nilsson wrote:
> On Wed, 31 Oct 2001, H . J . Lu wrote:
> > How about this patch? Tested on Linux/x86 and Linux/alpha.
> 
> That's what I was thinking of, except (for both tests)...
> 
> > +#target: *-*-*
> 
> The target-specifier is optional; you don't need it for *-*-*.
> 
> > +     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED    . protected
> > +#...
> 
> Not sure why I think so, but I think the last "#..." should
> better be "#pass".  Perhaps it's because things then look a bit
> clearer when the test fails.
> 
> Another caveat is that the order of the symbols might change,
> the test fail, but the output still be valid.  Perhaps different
> tests, each selecting one line, if it's important.
> 

How about this one?


H.J.
----
2001-10-31  H.J. Lu  <hjl@gnu.org>

	* ld-elfvsb/elfvsb.exp: Add the "ld -r" test.

	* ld-elfvsb/hidden0.d: New.
	* ld-elfvsb/hidden1.d: New.
	* ld-elfvsb/internal0.d: New.
	* ld-elfvsb/internal1.d: New.
	* ld-elfvsb/protected0.d: New.
	* ld-elfvsb/protected1.d: New.
	* ld-elfvsb/undef.d: New.
	* ld-elfvsb/undef.s: New.

--- ld-elfvsb/define.s.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/define.s	Wed Oct 31 13:40:44 2001
@@ -0,0 +1,6 @@
+	.globl protected
+protected:
+	.globl hidden
+hidden:
+	.globl internal
+internal:
--- ld-elfvsb/elfvsb.exp.vsb	Wed Jun  6 15:07:50 2001
+++ ld-elfvsb/elfvsb.exp	Wed Oct 31 12:04:59 2001
@@ -42,6 +42,13 @@ if { [istarget *-*-linux*aout*] \
     return
 }
 
+set test_list [lsort [glob -nocomplain $srcdir/$subdir/*.d]]
+foreach t $test_list {
+    # We need to strip the ".d", but can leave the dirname.
+    verbose [file rootname $t]
+    run_dump_test [file rootname $t]
+}
+
 set tmpdir tmpdir
 set SHCFLAG ""
 
--- ld-elfvsb/hidden0.d.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/hidden0.d	Wed Oct 31 13:49:11 2001
@@ -0,0 +1,10 @@
+#source: define.s
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN    . hidden
+#pass
--- ld-elfvsb/hidden1.d.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/hidden1.d	Wed Oct 31 13:48:26 2001
@@ -0,0 +1,9 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL HIDDEN  UND hidden
+#pass
--- ld-elfvsb/internal0.d.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/internal0.d	Wed Oct 31 13:48:37 2001
@@ -0,0 +1,10 @@
+#source: define.s
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL INTERNAL    . internal
+#pass
--- ld-elfvsb/internal1.d.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/internal1.d	Wed Oct 31 13:48:46 2001
@@ -0,0 +1,9 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL INTERNAL  UND internal
+#pass
--- ld-elfvsb/protected0.d.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/protected0.d	Wed Oct 31 13:48:57 2001
@@ -0,0 +1,10 @@
+#source: define.s
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED    . protected
+#pass
--- ld-elfvsb/protected1.d.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/protected1.d	Wed Oct 31 13:49:04 2001
@@ -0,0 +1,9 @@
+#source: undef.s
+#ld: -r
+#readelf: -s
+
+Symbol table '.symtab' contains .* entries:
+   Num:    Value[ 	]+Size Type    Bind   Vis      Ndx Name
+#...
+     .: [0-9a-fA-F]*     0 NOTYPE  GLOBAL PROTECTED  UND protected
+#pass
--- ld-elfvsb/undef.s.vsb	Wed Oct 31 13:45:07 2001
+++ ld-elfvsb/undef.s	Wed Oct 31 13:40:44 2001
@@ -0,0 +1,3 @@
+	.protected protected
+	.hidden hidden
+	.internal internal

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

* Re: PATCH: Add the "ld -r" test for ELF visibility.
  2001-10-31 13:53                     ` H . J . Lu
@ 2001-10-31 15:09                       ` Hans-Peter Nilsson
  0 siblings, 0 replies; 13+ messages in thread
From: Hans-Peter Nilsson @ 2001-10-31 15:09 UTC (permalink / raw)
  To: H . J . Lu; +Cc: cgd, nickc, binutils

On Wed, 31 Oct 2001, H . J . Lu wrote:
> How about this one?

Looks good to me, FWIW.

brgds, H-P

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

end of thread, other threads:[~2001-10-31 15:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-29 14:35 ld bug? Vassili Karpov
2001-10-30 23:30 ` H . J . Lu
2001-10-30 23:33   ` H . J . Lu
2001-10-30 23:42     ` H . J . Lu
2001-10-31  6:27       ` Nick Clifton
     [not found]         ` <mailpost.1004538510.13276@postal.sibyte.com>
     [not found]           ` <yov5wv1bpxbb.fsf@broadcom.com>
2001-10-31 10:37             ` PATCH: Add the "ld -r" test for ELF visibility H . J . Lu
2001-10-31 11:12               ` Hans-Peter Nilsson
2001-10-31 12:07                 ` H . J . Lu
2001-10-31 13:20                 ` H . J . Lu
2001-10-31 13:31                   ` Hans-Peter Nilsson
2001-10-31 13:35                     ` cgd
2001-10-31 13:53                     ` H . J . Lu
2001-10-31 15:09                       ` Hans-Peter Nilsson

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).