* [parisc-linux] [hppa] binutils will not build shared libraries with external deps?
@ 2003-05-27 5:22 Randolph Chung
2003-05-28 19:07 ` [parisc-linux] " amodra
2003-05-28 19:07 ` amodra
0 siblings, 2 replies; 14+ messages in thread
From: Randolph Chung @ 2003-05-27 5:22 UTC (permalink / raw)
To: bug-binutils, binutils; +Cc: debian-gcc, parisc-linux
Looks like latest binutils CVS (also as of 2.14.90.0.1) cannot build
shared libraries that have external symbols on at least hppa-linux:
tausq@ios:~$ cat blah.c
extern int foo();
int call_foo() { return foo(); }
tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
/tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
: undefined reference to `foo'
this worked fine on older binutils (e.g. 2.13.90.0.16 worked).
does anyone know what might be broken? this is causing a lot of failures
in the binutils test suite....
thanks,
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* [parisc-linux] [hppa] binutils will not build shared libraries with external deps?
@ 2003-05-27 5:22 Randolph Chung
0 siblings, 0 replies; 14+ messages in thread
From: Randolph Chung @ 2003-05-27 5:22 UTC (permalink / raw)
To: bug-binutils, binutils; +Cc: debian-gcc, parisc-linux
Looks like latest binutils CVS (also as of 2.14.90.0.1) cannot build
shared libraries that have external symbols on at least hppa-linux:
tausq@ios:~$ cat blah.c
extern int foo();
int call_foo() { return foo(); }
tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
/tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
: undefined reference to `foo'
this worked fine on older binutils (e.g. 2.13.90.0.16 worked).
does anyone know what might be broken? this is causing a lot of failures
in the binutils test suite....
thanks,
randolph
--
Randolph Chung
Debian GNU/Linux Developer, hppa/ia64 ports
http://www.tausq.org/
^ permalink raw reply [flat|nested] 14+ messages in thread
* [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-27 5:22 [parisc-linux] [hppa] binutils will not build shared libraries with external deps? Randolph Chung
@ 2003-05-28 19:07 ` amodra
2003-05-28 20:27 ` H. J. Lu
` (3 more replies)
2003-05-28 19:07 ` amodra
1 sibling, 4 replies; 14+ messages in thread
From: amodra @ 2003-05-28 19:07 UTC (permalink / raw)
To: Randolph Chung; +Cc: bug-binutils, binutils, parisc-linux, debian-gcc
On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> : undefined reference to `foo'
This should fix it. Would someone mind applying it for me? I'm in
transit at the moment and internet access is slow and flaky. 2.14
branch too, I guess.
* elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
undefined_symbol call.
--- bfd/elf32-hppa.c~ 2003-05-08 12:08:31.000000000 +0930
+++ bfd/elf32-hppa.c 2003-05-28 10:44:19.000000000 +0930
@@ -3666,16 +3666,11 @@ elf32_hppa_relocate_section (output_bfd,
}
else if (h->elf.root.type == bfd_link_hash_undefweak)
;
- else if (info->shared && !info->no_undefined
+ else if (info->shared
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
&& h->elf.type != STT_PARISC_MILLI)
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->elf.root.root.string, input_bfd,
- input_section, rel->r_offset, FALSE)))
- return FALSE;
- warned_undef = TRUE;
- }
+ ;
else
{
if (!((*info->callbacks->undefined_symbol)
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-27 5:22 [parisc-linux] [hppa] binutils will not build shared libraries with external deps? Randolph Chung
2003-05-28 19:07 ` [parisc-linux] " amodra
@ 2003-05-28 19:07 ` amodra
1 sibling, 0 replies; 14+ messages in thread
From: amodra @ 2003-05-28 19:07 UTC (permalink / raw)
To: Randolph Chung; +Cc: bug-binutils, binutils, parisc-linux, debian-gcc
On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> : undefined reference to `foo'
This should fix it. Would someone mind applying it for me? I'm in
transit at the moment and internet access is slow and flaky. 2.14
branch too, I guess.
* elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
undefined_symbol call.
--- bfd/elf32-hppa.c~ 2003-05-08 12:08:31.000000000 +0930
+++ bfd/elf32-hppa.c 2003-05-28 10:44:19.000000000 +0930
@@ -3666,16 +3666,11 @@ elf32_hppa_relocate_section (output_bfd,
}
else if (h->elf.root.type == bfd_link_hash_undefweak)
;
- else if (info->shared && !info->no_undefined
+ else if (info->shared
+ && !info->no_undefined
&& ELF_ST_VISIBILITY (h->elf.other) == STV_DEFAULT
&& h->elf.type != STT_PARISC_MILLI)
- {
- if (!((*info->callbacks->undefined_symbol)
- (info, h->elf.root.root.string, input_bfd,
- input_section, rel->r_offset, FALSE)))
- return FALSE;
- warned_undef = TRUE;
- }
+ ;
else
{
if (!((*info->callbacks->undefined_symbol)
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-28 19:07 ` [parisc-linux] " amodra
@ 2003-05-28 20:27 ` H. J. Lu
2003-05-29 16:10 ` Matthias Klose
2003-05-29 16:10 ` Matthias Klose
2003-05-28 20:27 ` H. J. Lu
` (2 subsequent siblings)
3 siblings, 2 replies; 14+ messages in thread
From: H. J. Lu @ 2003-05-28 20:27 UTC (permalink / raw)
To: Randolph Chung, bug-binutils, binutils, parisc-linux, debian-gcc
On Thu, May 29, 2003 at 04:37:06AM +0930, amodra@bigpond.net.au wrote:
> On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > : undefined reference to `foo'
>
> This should fix it. Would someone mind applying it for me? I'm in
> transit at the moment and internet access is slow and flaky. 2.14
> branch too, I guess.
Applied to mainline.
H.J.
^ permalink raw reply [flat|nested] 14+ messages in thread
* [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-28 19:07 ` [parisc-linux] " amodra
2003-05-28 20:27 ` H. J. Lu
@ 2003-05-28 20:27 ` H. J. Lu
2003-06-02 21:10 ` John David Anglin
2003-06-02 21:10 ` John David Anglin
3 siblings, 0 replies; 14+ messages in thread
From: H. J. Lu @ 2003-05-28 20:27 UTC (permalink / raw)
To: Randolph Chung, bug-binutils, binutils, parisc-linux, debian-gcc
On Thu, May 29, 2003 at 04:37:06AM +0930, amodra@bigpond.net.au wrote:
> On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > : undefined reference to `foo'
>
> This should fix it. Would someone mind applying it for me? I'm in
> transit at the moment and internet access is slow and flaky. 2.14
> branch too, I guess.
Applied to mainline.
H.J.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-28 20:27 ` H. J. Lu
2003-05-29 16:10 ` Matthias Klose
@ 2003-05-29 16:10 ` Matthias Klose
1 sibling, 0 replies; 14+ messages in thread
From: Matthias Klose @ 2003-05-29 16:10 UTC (permalink / raw)
To: H. J. Lu; +Cc: Randolph Chung, bug-binutils, binutils, parisc-linux, debian-gcc
H. J. Lu writes:
> On Thu, May 29, 2003 at 04:37:06AM +0930, amodra@bigpond.net.au wrote:
> > On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > > : undefined reference to `foo'
> >
> > This should fix it. Would someone mind applying it for me? I'm in
> > transit at the moment and internet access is slow and flaky. 2.14
> > branch too, I guess.
>
> Applied to mainline.
built binutils-2.14.90.0.4 with this patch, diffs between 2.14.90.0.3
and 2.14.90.0.4 (plus patch) attached.
Matthias
--- ../ts-2.14.90.0.3 2003-05-28 23:26:27.000000000 +0200
+++ ../ts-2.14.90.0.4 2003-05-28 23:27:04.000000000 +0200
@@ -1,4 +1,4 @@
-Test Run By doko on Sat May 24 09:29:16 2003
+Test Run By doko on Wed May 28 23:17:19 2003
Native configuration is hppa-unknown-linux-gnu
=== binutils tests ===
@@ -52,7 +52,7 @@
=== binutils Summary ===
# of expected passes 32
-Test Run By doko on Sat May 24 09:29:43 2003
+Test Run By doko on Wed May 28 23:17:47 2003
Native configuration is hppa-unknown-linux-gnu
=== gas tests ===
@@ -385,7 +385,7 @@
# of expected failures 11
../as-new Inc.
-Test Run By doko on Sat May 24 09:33:34 2003
+Test Run By doko on Wed May 28 23:21:37 2003
Native configuration is hppa-unknown-linux-gnu
=== ld tests ===
@@ -425,7 +425,7 @@
PASS: size/aligment change of common symbols (change 2)
Running ld/testsuite/ld-elfvers/vers.exp ...
PASS: vers1
-FAIL: vers2
+PASS: vers2
PASS: vers3
PASS: vers4
PASS: vers4a
@@ -472,7 +472,7 @@
PASS: vers27c1
PASS: vers27c2
PASS: vers27d1
-FAIL: vers27d2
+PASS: vers27d2
PASS: vers27d3
PASS: vers27d4
PASS: vers27d5
@@ -485,9 +485,9 @@
PASS: ld-elfvsb/protected1
FAIL: visibility (hidden) (non PIC)
FAIL: visibility (hidden) (non PIC, load offset)
-FAIL: visibility (hidden)
+PASS: visibility (hidden)
FAIL: visibility (hidden) (PIC main, non PIC so)
-FAIL: visibility (hidden) (PIC main)
+PASS: visibility (hidden) (PIC main)
FAIL: visibility (hidden_normal) (non PIC)
FAIL: visibility (hidden_normal) (non PIC, load offset)
FAIL: visibility (hidden_normal)
@@ -500,9 +500,9 @@
PASS: visibility (hidden_undef) (PIC main)
FAIL: visibility (hidden_undef_def) (non PIC)
FAIL: visibility (hidden_undef_def) (non PIC, load offset)
-FAIL: visibility (hidden_undef_def)
+PASS: visibility (hidden_undef_def)
FAIL: visibility (hidden_undef_def) (PIC main, non PIC so)
-FAIL: visibility (hidden_undef_def) (PIC main)
+PASS: visibility (hidden_undef_def) (PIC main)
FAIL: visibility (hidden_weak) (non PIC)
FAIL: visibility (hidden_weak) (non PIC, load offset)
FAIL: visibility (hidden_weak)
@@ -510,9 +510,9 @@
FAIL: visibility (hidden_weak) (PIC main)
FAIL: visibility (protected) (non PIC)
FAIL: visibility (protected) (non PIC, load offset)
-FAIL: visibility (protected)
+PASS: visibility (protected)
FAIL: visibility (protected) (PIC main, non PIC so)
-FAIL: visibility (protected) (PIC main)
+PASS: visibility (protected) (PIC main)
FAIL: visibility (protected_undef) (non PIC)
FAIL: visibility (protected_undef) (non PIC, load offset)
PASS: visibility (protected_undef)
@@ -520,9 +520,9 @@
PASS: visibility (protected_undef) (PIC main)
FAIL: visibility (protected_undef_def) (non PIC)
FAIL: visibility (protected_undef_def) (non PIC, load offset)
-FAIL: visibility (protected_undef_def)
+PASS: visibility (protected_undef_def)
FAIL: visibility (protected_undef_def) (PIC main, non PIC so)
-FAIL: visibility (protected_undef_def) (PIC main)
+PASS: visibility (protected_undef_def) (PIC main)
FAIL: visibility (protected_weak) (non PIC)
FAIL: visibility (protected_weak) (non PIC, load offset)
FAIL: visibility (protected_weak)
@@ -547,10 +547,10 @@
FAIL: ELF weak func last DSO
PASS: ELF DSO weak data first
PASS: ELF DSO weak data last
-FAIL: ELF DSO weak data first DSO
-FAIL: ELF DSO weak data last DSO
-FAIL: ELF DSO weak data first DSO common
-FAIL: ELF DSO weak data last DSO common
+PASS: ELF DSO weak data first DSO
+PASS: ELF DSO weak data last DSO
+PASS: ELF DSO weak data first DSO common
+PASS: ELF DSO weak data last DSO common
PASS: ELF weak data first
PASS: ELF weak data last
PASS: ELF weak data first common
@@ -613,10 +613,10 @@
Running ld/testsuite/ld-shared/shared.exp ...
FAIL: shared (non PIC)
FAIL: shared (non PIC, load offset)
-FAIL: shared
+PASS: shared
PASS: shared -Bsymbolic
FAIL: shared (PIC main, non PIC so)
-FAIL: shared (PIC main)
+PASS: shared (PIC main)
Running ld/testsuite/ld-sparc/sparc.exp ...
Running ld/testsuite/ld-srec/srec.exp ...
XFAIL: S-records
@@ -635,8 +635,8 @@
=== ld Summary ===
-# of expected passes 117
-# of unexpected failures 63
+# of expected passes 133
+# of unexpected failures 47
# of expected failures 4
builddir-single/ld/ld-new Inc.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-28 20:27 ` H. J. Lu
@ 2003-05-29 16:10 ` Matthias Klose
2003-05-29 16:10 ` Matthias Klose
1 sibling, 0 replies; 14+ messages in thread
From: Matthias Klose @ 2003-05-29 16:10 UTC (permalink / raw)
To: H. J. Lu; +Cc: Randolph Chung, bug-binutils, binutils, parisc-linux, debian-gcc
H. J. Lu writes:
> On Thu, May 29, 2003 at 04:37:06AM +0930, amodra@bigpond.net.au wrote:
> > On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > > : undefined reference to `foo'
> >
> > This should fix it. Would someone mind applying it for me? I'm in
> > transit at the moment and internet access is slow and flaky. 2.14
> > branch too, I guess.
>
> Applied to mainline.
built binutils-2.14.90.0.4 with this patch, diffs between 2.14.90.0.3
and 2.14.90.0.4 (plus patch) attached.
Matthias
--- ../ts-2.14.90.0.3 2003-05-28 23:26:27.000000000 +0200
+++ ../ts-2.14.90.0.4 2003-05-28 23:27:04.000000000 +0200
@@ -1,4 +1,4 @@
-Test Run By doko on Sat May 24 09:29:16 2003
+Test Run By doko on Wed May 28 23:17:19 2003
Native configuration is hppa-unknown-linux-gnu
=== binutils tests ===
@@ -52,7 +52,7 @@
=== binutils Summary ===
# of expected passes 32
-Test Run By doko on Sat May 24 09:29:43 2003
+Test Run By doko on Wed May 28 23:17:47 2003
Native configuration is hppa-unknown-linux-gnu
=== gas tests ===
@@ -385,7 +385,7 @@
# of expected failures 11
../as-new Inc.
-Test Run By doko on Sat May 24 09:33:34 2003
+Test Run By doko on Wed May 28 23:21:37 2003
Native configuration is hppa-unknown-linux-gnu
=== ld tests ===
@@ -425,7 +425,7 @@
PASS: size/aligment change of common symbols (change 2)
Running ld/testsuite/ld-elfvers/vers.exp ...
PASS: vers1
-FAIL: vers2
+PASS: vers2
PASS: vers3
PASS: vers4
PASS: vers4a
@@ -472,7 +472,7 @@
PASS: vers27c1
PASS: vers27c2
PASS: vers27d1
-FAIL: vers27d2
+PASS: vers27d2
PASS: vers27d3
PASS: vers27d4
PASS: vers27d5
@@ -485,9 +485,9 @@
PASS: ld-elfvsb/protected1
FAIL: visibility (hidden) (non PIC)
FAIL: visibility (hidden) (non PIC, load offset)
-FAIL: visibility (hidden)
+PASS: visibility (hidden)
FAIL: visibility (hidden) (PIC main, non PIC so)
-FAIL: visibility (hidden) (PIC main)
+PASS: visibility (hidden) (PIC main)
FAIL: visibility (hidden_normal) (non PIC)
FAIL: visibility (hidden_normal) (non PIC, load offset)
FAIL: visibility (hidden_normal)
@@ -500,9 +500,9 @@
PASS: visibility (hidden_undef) (PIC main)
FAIL: visibility (hidden_undef_def) (non PIC)
FAIL: visibility (hidden_undef_def) (non PIC, load offset)
-FAIL: visibility (hidden_undef_def)
+PASS: visibility (hidden_undef_def)
FAIL: visibility (hidden_undef_def) (PIC main, non PIC so)
-FAIL: visibility (hidden_undef_def) (PIC main)
+PASS: visibility (hidden_undef_def) (PIC main)
FAIL: visibility (hidden_weak) (non PIC)
FAIL: visibility (hidden_weak) (non PIC, load offset)
FAIL: visibility (hidden_weak)
@@ -510,9 +510,9 @@
FAIL: visibility (hidden_weak) (PIC main)
FAIL: visibility (protected) (non PIC)
FAIL: visibility (protected) (non PIC, load offset)
-FAIL: visibility (protected)
+PASS: visibility (protected)
FAIL: visibility (protected) (PIC main, non PIC so)
-FAIL: visibility (protected) (PIC main)
+PASS: visibility (protected) (PIC main)
FAIL: visibility (protected_undef) (non PIC)
FAIL: visibility (protected_undef) (non PIC, load offset)
PASS: visibility (protected_undef)
@@ -520,9 +520,9 @@
PASS: visibility (protected_undef) (PIC main)
FAIL: visibility (protected_undef_def) (non PIC)
FAIL: visibility (protected_undef_def) (non PIC, load offset)
-FAIL: visibility (protected_undef_def)
+PASS: visibility (protected_undef_def)
FAIL: visibility (protected_undef_def) (PIC main, non PIC so)
-FAIL: visibility (protected_undef_def) (PIC main)
+PASS: visibility (protected_undef_def) (PIC main)
FAIL: visibility (protected_weak) (non PIC)
FAIL: visibility (protected_weak) (non PIC, load offset)
FAIL: visibility (protected_weak)
@@ -547,10 +547,10 @@
FAIL: ELF weak func last DSO
PASS: ELF DSO weak data first
PASS: ELF DSO weak data last
-FAIL: ELF DSO weak data first DSO
-FAIL: ELF DSO weak data last DSO
-FAIL: ELF DSO weak data first DSO common
-FAIL: ELF DSO weak data last DSO common
+PASS: ELF DSO weak data first DSO
+PASS: ELF DSO weak data last DSO
+PASS: ELF DSO weak data first DSO common
+PASS: ELF DSO weak data last DSO common
PASS: ELF weak data first
PASS: ELF weak data last
PASS: ELF weak data first common
@@ -613,10 +613,10 @@
Running ld/testsuite/ld-shared/shared.exp ...
FAIL: shared (non PIC)
FAIL: shared (non PIC, load offset)
-FAIL: shared
+PASS: shared
PASS: shared -Bsymbolic
FAIL: shared (PIC main, non PIC so)
-FAIL: shared (PIC main)
+PASS: shared (PIC main)
Running ld/testsuite/ld-sparc/sparc.exp ...
Running ld/testsuite/ld-srec/srec.exp ...
XFAIL: S-records
@@ -635,8 +635,8 @@
=== ld Summary ===
-# of expected passes 117
-# of unexpected failures 63
+# of expected passes 133
+# of unexpected failures 47
# of expected failures 4
builddir-single/ld/ld-new Inc.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-28 19:07 ` [parisc-linux] " amodra
` (2 preceding siblings ...)
2003-06-02 21:10 ` John David Anglin
@ 2003-06-02 21:10 ` John David Anglin
2003-06-02 23:09 ` Alan Modra
2003-06-02 23:09 ` Alan Modra
3 siblings, 2 replies; 14+ messages in thread
From: John David Anglin @ 2003-06-02 21:10 UTC (permalink / raw)
To: amodra; +Cc: tausq, bug-binutils, binutils, parisc-linux, debian-gcc
> On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > : undefined reference to `foo'
>
> This should fix it. Would someone mind applying it for me? I'm in
> transit at the moment and internet access is slow and flaky. 2.14
> branch too, I guess.
>
> * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
> undefined_symbol call.
I'm not fully up to speed on this but there still appear to be problems
with undefined symbols in shared libraries:
gcc -L/home/dave/binutils-2.14.90/objdir/ld -g -g -O2 -DHIDDEN_TEST -fpic -B/ho
me/dave/binutils-2.14.90/objdir/ld/tmpdir/gas/ -I/home/dave/binutils-2.14.90/src
/ld/testsuite/ld-elfvsb -g -O2 -c /home/dave/binutils-2.14.90/src/ld/testsuite/
ld-elfvsb/sh1.c -o tmpdir/sh1p.o
gcc -L/home/dave/binutils-2.14.90/objdir/ld -g -g -O2 -DHIDDEN_TEST -fpic -B/ho
me/dave/binutils-2.14.90/objdir/ld/tmpdir/gas/ -I/home/dave/binutils-2.14.90/src
/ld/testsuite/ld-elfvsb -g -O2 -c /home/dave/binutils-2.14.90/src/ld/testsuite/
ld-elfvsb/sh2.c -o tmpdir/sh2p.o
gcc -L/home/dave/binutils-2.14.90/objdir/ld -B/home/dave/binutils-2.14.90/objdir
/ld/tmpdir/ld/ -L/home/dave/opt/gnu/hppa-linux/lib -L/home/dave/opt/gnu/lib -L/u
sr/local/lib -L/lib -L/usr/lib -o tmpdir/vp.so -shared tmpdir/sh1p.o tmpdir/sh
2p.o
tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
/home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
ence to `mainvar'
...
FAIL: visibility (hidden)
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-05-28 19:07 ` [parisc-linux] " amodra
2003-05-28 20:27 ` H. J. Lu
2003-05-28 20:27 ` H. J. Lu
@ 2003-06-02 21:10 ` John David Anglin
2003-06-02 21:10 ` John David Anglin
3 siblings, 0 replies; 14+ messages in thread
From: John David Anglin @ 2003-06-02 21:10 UTC (permalink / raw)
To: amodra; +Cc: tausq, bug-binutils, binutils, parisc-linux, debian-gcc
> On Mon, May 26, 2003 at 10:22:51PM -0700, Randolph Chung wrote:
> > tausq@ios:~$ gcc -shared -fPIC -o blah.so blah.c
> > /tmp/ccC3fZeH.o(.text+0x1c): In function `call_foo':
> > : undefined reference to `foo'
>
> This should fix it. Would someone mind applying it for me? I'm in
> transit at the moment and internet access is slow and flaky. 2.14
> branch too, I guess.
>
> * elf32-hppa.c (elf32_hppa_relocate_section): Delete bogus
> undefined_symbol call.
I'm not fully up to speed on this but there still appear to be problems
with undefined symbols in shared libraries:
gcc -L/home/dave/binutils-2.14.90/objdir/ld -g -g -O2 -DHIDDEN_TEST -fpic -B/ho
me/dave/binutils-2.14.90/objdir/ld/tmpdir/gas/ -I/home/dave/binutils-2.14.90/src
/ld/testsuite/ld-elfvsb -g -O2 -c /home/dave/binutils-2.14.90/src/ld/testsuite/
ld-elfvsb/sh1.c -o tmpdir/sh1p.o
gcc -L/home/dave/binutils-2.14.90/objdir/ld -g -g -O2 -DHIDDEN_TEST -fpic -B/ho
me/dave/binutils-2.14.90/objdir/ld/tmpdir/gas/ -I/home/dave/binutils-2.14.90/src
/ld/testsuite/ld-elfvsb -g -O2 -c /home/dave/binutils-2.14.90/src/ld/testsuite/
ld-elfvsb/sh2.c -o tmpdir/sh2p.o
gcc -L/home/dave/binutils-2.14.90/objdir/ld -B/home/dave/binutils-2.14.90/objdir
/ld/tmpdir/ld/ -L/home/dave/opt/gnu/hppa-linux/lib -L/home/dave/opt/gnu/lib -L/u
sr/local/lib -L/lib -L/usr/lib -o tmpdir/vp.so -shared tmpdir/sh1p.o tmpdir/sh
2p.o
tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
/home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
ence to `mainvar'
...
FAIL: visibility (hidden)
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-06-02 21:10 ` John David Anglin
@ 2003-06-02 23:09 ` Alan Modra
2003-06-04 18:23 ` John David Anglin
2003-06-04 18:23 ` John David Anglin
2003-06-02 23:09 ` Alan Modra
1 sibling, 2 replies; 14+ messages in thread
From: Alan Modra @ 2003-06-02 23:09 UTC (permalink / raw)
To: John David Anglin; +Cc: tausq, bug-binutils, binutils, parisc-linux, debian-gcc
On Mon, Jun 02, 2003 at 05:10:38PM -0400, John David Anglin wrote:
> tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
> /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
> ence to `mainvar'
> ...
> FAIL: visibility (hidden)
Fixing this one probably requires porting some of the recent changes
I made for x86 and ppc to hppa. See SYMBOL_REFERENCES_LOCAL and
SYMBOL_CALLS_LOCAL.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-06-02 21:10 ` John David Anglin
2003-06-02 23:09 ` Alan Modra
@ 2003-06-02 23:09 ` Alan Modra
1 sibling, 0 replies; 14+ messages in thread
From: Alan Modra @ 2003-06-02 23:09 UTC (permalink / raw)
To: John David Anglin; +Cc: tausq, bug-binutils, binutils, parisc-linux, debian-gcc
On Mon, Jun 02, 2003 at 05:10:38PM -0400, John David Anglin wrote:
> tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
> /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
> ence to `mainvar'
> ...
> FAIL: visibility (hidden)
Fixing this one probably requires porting some of the recent changes
I made for x86 and ppc to hppa. See SYMBOL_REFERENCES_LOCAL and
SYMBOL_CALLS_LOCAL.
--
Alan Modra
IBM OzLabs - Linux Technology Centre
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-06-02 23:09 ` Alan Modra
2003-06-04 18:23 ` John David Anglin
@ 2003-06-04 18:23 ` John David Anglin
1 sibling, 0 replies; 14+ messages in thread
From: John David Anglin @ 2003-06-04 18:23 UTC (permalink / raw)
To: Alan Modra; +Cc: tausq, bug-binutils, binutils, parisc-linux, debian-gcc
> On Mon, Jun 02, 2003 at 05:10:38PM -0400, John David Anglin wrote:
> > tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
> > /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
> > ence to `mainvar'
> > ...
> > FAIL: visibility (hidden)
>
> Fixing this one probably requires porting some of the recent changes
> I made for x86 and ppc to hppa. See SYMBOL_REFERENCES_LOCAL and
> SYMBOL_CALLS_LOCAL.
Nope. This was caused by the previous bug and the change to using
gcc as the driver program to run the newly built linker. Using `-B'
doesn't override the GCC configure option `--with-ld='. The same
problem occurs with using gcc to run the newly build assembler
(`-B' doesn't override `--with-as='). I think we need to revert
to the previous technique for running these tools in the ld
testsuite.
To work around this problem, I installed the newly built tools.
This fixed most of the ld FAILS but we are still left with the
following:
Running /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/elfvsb.exp ...
FAIL: visibility (hidden_undef_def)
FAIL: visibility (hidden_undef_def) (PIC main)
FAIL: visibility (hidden_weak)
FAIL: visibility (hidden_weak) (PIC main)
FAIL: visibility (protected_weak)
FAIL: visibility (protected_weak) (PIC main)
Running /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfweak/elfweak.exp ...
FAIL: ELF weak func first DSO
FAIL: ELF weak func last DSO
FAIL: ELF weak data first DSO
FAIL: ELF weak data last DSO
FAIL: ELF weak data first DSO common
FAIL: ELF weak data last DSO common
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [parisc-linux] Re: [hppa] binutils will not build shared libraries with external deps?
2003-06-02 23:09 ` Alan Modra
@ 2003-06-04 18:23 ` John David Anglin
2003-06-04 18:23 ` John David Anglin
1 sibling, 0 replies; 14+ messages in thread
From: John David Anglin @ 2003-06-04 18:23 UTC (permalink / raw)
To: Alan Modra; +Cc: tausq, bug-binutils, binutils, parisc-linux, debian-gcc
> On Mon, Jun 02, 2003 at 05:10:38PM -0400, John David Anglin wrote:
> > tmpdir/sh1p.o(.text+0x0): In function `shlib_mainvar':
> > /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/sh1.c:32: undefined refer
> > ence to `mainvar'
> > ...
> > FAIL: visibility (hidden)
>
> Fixing this one probably requires porting some of the recent changes
> I made for x86 and ppc to hppa. See SYMBOL_REFERENCES_LOCAL and
> SYMBOL_CALLS_LOCAL.
Nope. This was caused by the previous bug and the change to using
gcc as the driver program to run the newly built linker. Using `-B'
doesn't override the GCC configure option `--with-ld='. The same
problem occurs with using gcc to run the newly build assembler
(`-B' doesn't override `--with-as='). I think we need to revert
to the previous technique for running these tools in the ld
testsuite.
To work around this problem, I installed the newly built tools.
This fixed most of the ld FAILS but we are still left with the
following:
Running /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfvsb/elfvsb.exp ...
FAIL: visibility (hidden_undef_def)
FAIL: visibility (hidden_undef_def) (PIC main)
FAIL: visibility (hidden_weak)
FAIL: visibility (hidden_weak) (PIC main)
FAIL: visibility (protected_weak)
FAIL: visibility (protected_weak) (PIC main)
Running /home/dave/binutils-2.14.90/src/ld/testsuite/ld-elfweak/elfweak.exp ...
FAIL: ELF weak func first DSO
FAIL: ELF weak func last DSO
FAIL: ELF weak data first DSO
FAIL: ELF weak data last DSO
FAIL: ELF weak data first DSO common
FAIL: ELF weak data last DSO common
Dave
--
J. David Anglin dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada (613) 990-0752 (FAX: 952-6602)
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2003-06-04 18:32 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-27 5:22 [parisc-linux] [hppa] binutils will not build shared libraries with external deps? Randolph Chung
2003-05-28 19:07 ` [parisc-linux] " amodra
2003-05-28 20:27 ` H. J. Lu
2003-05-29 16:10 ` Matthias Klose
2003-05-29 16:10 ` Matthias Klose
2003-05-28 20:27 ` H. J. Lu
2003-06-02 21:10 ` John David Anglin
2003-06-02 21:10 ` John David Anglin
2003-06-02 23:09 ` Alan Modra
2003-06-04 18:23 ` John David Anglin
2003-06-04 18:23 ` John David Anglin
2003-06-02 23:09 ` Alan Modra
2003-05-28 19:07 ` amodra
-- strict thread matches above, loose matches on Subject: below --
2003-05-27 5:22 [parisc-linux] " Randolph Chung
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox