[Bug binutils/15033] option capable of stripping LTO (all sections beginning with .gnu.lto_)

2013-02-15 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=15033

--- Comment #4 from cvs-commit at gcc dot gnu.org  2013-02-15 09:32:35 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:ni...@sourceware.org2013-02-15 09:32:32

Modified files:
binutils   : ChangeLog objcopy.c NEWS 
binutils/doc   : binutils.texi 

Log message:
PR binutils/15033
* objcopy.c (enum change_action): Delete.
(struct section_list): Delete remove, copy, change_vma, change_lma
and set_flags fields.  Add context field.
(find_section_list): Add a context parameter.  Add support for
wildcard characters in section names.
(is_strip_section): Check for sections being both  copied and
removed.
(copy_object): Pass context to find_section_list.
(setup_section): Likewise.
(copy_section): Likewise.
(copy_main): Likewise.
* doc/binutils: Document the new behaviour.
* NEWS: Mention the new feature

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1988&r2=1.1989
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/objcopy.c.diff?cvsroot=src&r1=1.163&r2=1.164
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/NEWS.diff?cvsroot=src&r1=1.111&r2=1.112
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/doc/binutils.texi.diff?cvsroot=src&r1=1.196&r2=1.197

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15033] option capable of stripping LTO (all sections beginning with .gnu.lto_)

2013-02-15 Thread nickc at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15033

Nick Clifton  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution||FIXED

--- Comment #5 from Nick Clifton  2013-02-15 09:33:53 
UTC ---
Hi Samuel,

  I have gone with H.J.'s suggestion of using fnmatch, and after some more code
tidying, and a few more bug fixes, I have checked the patch in.

Cheers
  Nick

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15140] AR produces invalid thin archive which cause binutils to crash

2013-02-15 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=15140

--- Comment #5 from cvs-commit at gcc dot gnu.org  2013-02-15 14:37:47 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:ni...@sourceware.org2013-02-15 14:37:39

Modified files:
binutils   : ChangeLog readelf.c ar.c elfcomm.c 
bfd: ChangeLog archive.c 
binutils/doc   : binutils.texi 

Log message:
PR binutils/15140
* ar.c (open_inarch): Fail on attempts to convert a normal archive
to a thin archive or vice versa.
* elfcomm.c (make_qualified_name): Handle corrupted thin
archives.
* readelf.c (process_archive): Likewise.
* doc/binutils.texi: Clarify documentation describing thin
archives.

* archive.c (_bfd_get_elt_at_filepos): Prevent an infinite loop
accessing a corrupt nested archive.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ChangeLog.diff?cvsroot=src&r1=1.1990&r2=1.1991
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/readelf.c.diff?cvsroot=src&r1=1.594&r2=1.595
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/ar.c.diff?cvsroot=src&r1=1.86&r2=1.87
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/elfcomm.c.diff?cvsroot=src&r1=1.4&r2=1.5
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5966&r2=1.5967
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/archive.c.diff?cvsroot=src&r1=1.95&r2=1.96
http://sourceware.org/cgi-bin/cvsweb.cgi/src/binutils/doc/binutils.texi.diff?cvsroot=src&r1=1.197&r2=1.198

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15140] AR produces invalid thin archive which cause binutils to crash

2013-02-15 Thread nickc at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15140

Nick Clifton  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||nickc at redhat dot com
 Resolution||FIXED

--- Comment #6 from Nick Clifton  2013-02-15 14:38:22 
UTC ---
Hi Dmitry,

  The problem here is not the flattening of thin archives, but rather the fact
that you are trying to convert a normal, non-thin, archive into a thin one. 
This is not supported, but ar should have produced an error message when the
attempt was made.

  I have checked in a patch which fixes ar so that it will produce an error
message.  It also updates the documentation to make it clear that archives
cannot be converted between normal and thin types.  Finally the patch fixes
readelf so that it no longer segfaults on the corrupted archive and nm so that
it no longer goes into an infinite loop trying to read its symbol table.

Cheers
  Nick

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15151] New: archive support is broken

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15151

 Bug #: 15151
   Summary: archive support is broken
   Product: binutils
   Version: 2.24 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: hjl.to...@gmail.com
CC: ni...@redhat.com
Classification: Unclassified


This patch:

http://sourceware.org/ml/binutils-cvs/2013-02/msg00118.html

breaks archive on x86-64:

[hjl@gnu-6 binutils]$ cat foo.s
.text
.global foo
foo:
nop
[hjl@gnu-6 binutils]$ ../gas/as-new --x32 -o foo.o foo.s
[hjl@gnu-6 binutils]$ ./ar rc libfoo.a foo.o
[hjl@gnu-6 binutils]$ ./nm-new --print-armap libfoo.a
./nm-new: libfoo.a: File format not recognized
[hjl@gnu-6 binutils]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15151] archive support is broken

2013-02-15 Thread hp at sourceware dot org
http://sourceware.org/bugzilla/show_bug.cgi?id=15151

Hans-Peter Nilsson  changed:

   What|Removed |Added

 CC||hp at sourceware dot org

--- Comment #1 from Hans-Peter Nilsson  2013-02-15 
17:18:36 UTC ---
Hey!  I was just about to email Nick about the fallout; cris-linux and cris-elf
have the following regressions, which I believe fit in this PR:

Running
/tmp/hpautotest-binutils/bsrc/src/binutils/testsuite/binutils-all/ar.exp ...
FAIL: ar symbol table
FAIL: ar thin archive (bfdtest1)
FAIL: ar thin archive with nested archive (bfdtest1)
FAIL: ar deterministic archive
FAIL: ar deleting an element
FAIL: ar moving an element
FAIL: ar unique symbol in archive
Running
/tmp/hpautotest-binutils/bsrc/src/binutils/testsuite/binutils-all/arm/objdump.exp
...
Running
/tmp/hpautotest-binutils/bsrc/src/binutils/testsuite/binutils-all/bfin/objdump.exp
...
Running
/tmp/hpautotest-binutils/bsrc/src/binutils/testsuite/binutils-all/compress.exp
...
FAIL: objcopy (objcopy decompress debug sections in archive)
FAIL: objcopy (objcopy compress debug sections in archive)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15140] AR produces invalid thin archive which cause binutils to crash

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15140

H.J. Lu  changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |

--- Comment #7 from H.J. Lu  2013-02-15 17:22:47 
UTC ---
This patch:

@@ -619,6 +617,7 @@ _bfd_append_relative_path (bfd *arch, char *elt_name)
 bfd *
 _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
 {
+  static file_ptr prev_filepos;
   struct areltdata *new_areldata;
   bfd *n_nfd;
   char *filename;
@@ -626,6 +625,12 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
   n_nfd = _bfd_look_for_bfd_in_cache (archive, filepos);
   if (n_nfd)
 return n_nfd;
+  /* PR15140: Prevent an inifnite recursion scanning a malformed nested
archive.  */
+  if (filepos == prev_filepos)
+{
+  bfd_set_error (bfd_error_malformed_archive);
+  return NULL;
+}

   if (0 > bfd_seek (archive, filepos, SEEK_SET))
 return NULL;
@@ -634,6 +639,7 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
 return NULL;

   filename = new_areldata->filename;
+  prev_filepos = filepos;

   if (bfd_is_thin_archive (archive))
 {

has 2 problems:

1. It sets prev_filepos on success.  The next call on the same
filepos returns NULL.
2. It checks prev_filepos without checking if archive is the same.

It caused PR 15151.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15151] archive support is broken

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15151

--- Comment #2 from H.J. Lu  2013-02-15 18:20:38 
UTC ---
diff --git a/bfd/archive.c b/bfd/archive.c
index e4183ea..4b6a81c 100644
--- a/bfd/archive.c
+++ b/bfd/archive.c
@@ -619,6 +617,7 @@ _bfd_append_relative_path (bfd *arch, char *elt_name)
 bfd *
 _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
 {
+  static file_ptr prev_filepos;
   struct areltdata *new_areldata;
   bfd *n_nfd;
   char *filename;
@@ -626,6 +625,12 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
   n_nfd = _bfd_look_for_bfd_in_cache (archive, filepos);
   if (n_nfd)
 return n_nfd;
+  /* PR15140: Prevent an inifnite recursion scanning a malformed nested
archive
.  */
+  if (filepos == prev_filepos)
+{
+  bfd_set_error (bfd_error_malformed_archive);
+  return NULL;
+}

   if (0 > bfd_seek (archive, filepos, SEEK_SET))
 return NULL;
@@ -634,6 +639,7 @@ _bfd_get_elt_at_filepos (bfd *archive, file_ptr filepos)
 return NULL;

   filename = new_areldata->filename;
+  prev_filepos = filepos;

   if (bfd_is_thin_archive (archive))
 {

fails to match any target after the first one.  For cris, the targets are:

a.out-cris elf32-us-cris elf32-cris ieee elf32-little elf32-big srec symbolsrec
verilog tekhex binary ihex

For x86-64, targets are

elf64-x86-64 elf32-i386 elf32-x86-64 a.out-i386-linux pei-i386 pei-x86-64
elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big plugin srec
symbolsrec verilog tekhex binary ihex

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15151] archive support is broken

2013-02-15 Thread cvs-commit at gcc dot gnu.org
http://sourceware.org/bugzilla/show_bug.cgi?id=15151

--- Comment #3 from cvs-commit at gcc dot gnu.org  2013-02-15 18:26:16 UTC ---
CVSROOT:/cvs/src
Module name:src
Changes by:h...@sourceware.org2013-02-15 18:26:06

Modified files:
bfd: ChangeLog archive.c 

Log message:
Don't allow a nested archive pointing to itself

PR binutils/15151
* archive.c (_bfd_find_nested_archive): Don't allow a nested
archive pointing to itself.
(_bfd_get_elt_at_filepos): Revert the last 2 changes.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5967&r2=1.5968
http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/archive.c.diff?cvsroot=src&r1=1.97&r2=1.98

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15151] archive support is broken

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15151

H.J. Lu  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED

--- Comment #4 from H.J. Lu  2013-02-15 19:29:08 
UTC ---
Fixed.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15140] AR produces invalid thin archive which cause binutils to crash

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15140

H.J. Lu  changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED

--- Comment #8 from H.J. Lu  2013-02-15 19:32:08 
UTC ---
A different fix checked in.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15126] [REGRESSION] 2.23.51.0.9 fails to link cairo with libstdc++ (could not read symbols: Invalid operation)

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15126

--- Comment #5 from H.J. Lu  2013-02-15 19:33:45 
UTC ---
(In reply to comment #4)
> Please double check if it is a real regression. I think it is a bug,
> not a regression.

You can re-run the failed linking command by hand with different linker to
verify it.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug binutils/15152] New: readelf and objdump don't print strings from .dwz file

2013-02-15 Thread tromey at redhat dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15152

 Bug #: 15152
   Summary: readelf and objdump don't print strings from .dwz file
   Product: binutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: binutils
AssignedTo: unassig...@sourceware.org
ReportedBy: tro...@redhat.com
Classification: Unclassified


If you process an executable with dwz, it may rewrite
the DWARF to reference strings in the new .dwz file.
Neither readelf nor objdump will actually show the content
of these strings.  For example:

objdump --dwarf=info ./gdb.cp/anon-struct
[...]
 <0>: Abbrev Number: 1 (DW_TAG_compile_unit)
   DW_AT_producer: (alt indirect string, offset: 0xb9)   
<10>   DW_AT_language: 4(C++)
<11>   DW_AT_name: (alt indirect string, offset: 0x44)  
<15>   DW_AT_comp_dir: (alt indirect string, offset: 0x85)  

Showing the strings would be very helpful.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15141] Linker (ld.bfd) option "--trace-symbol" does not work with LTO

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15141

--- Comment #1 from H.J. Lu  2013-02-15 19:31:24 
UTC ---
A patch is posted at

http://sourceware.org/ml/binutils/2013-02/msg00198.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15149] Weak reference leads to DT_NEEDED entry

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15149

--- Comment #1 from H.J. Lu  2013-02-15 23:41:33 
UTC ---
This patch:

http://sourceware.org/ml/binutils/2013-02/msg00186.html

caused:

/export/gnu/import/git/gcc-test-intel64/bld/gcc/xgcc
-B/export/gnu/import/git/gcc-test-intel64/bld/gcc/
/export/gnu/import/git/gcc-test-intel64/src-trunk/libjava/testsuite/libjava.jni/invocation/PR16923.c
-I. -I..
-I/export/gnu/import/git/gcc-test-intel64/src-trunk/libjava/testsuite/libjava.jni
-I/export/gnu/import/git/gcc-test-intel64/src-trunk/libjava/testsuite/../include
-I/export/gnu/import/git/gcc-test-intel64/src-trunk/libjava/testsuite/../classpath/include
-fdollars-in-identifiers
-L/export/gnu/import/git/gcc-test-intel64/bld/x86_64-unknown-linux-gnu/32/libjava/.libs
-ljvm -lm -m32 -o PR16923^M
/usr/local/bin/ld:
/export/gnu/import/git/gcc-test-intel64/bld/gcc/32/crtbegin.o: undefined
reference to symbol '_Jv_RegisterClasses'^M
/usr/local/bin/ld: note: '_Jv_RegisterClasses' is defined in DSO
/export/gnu/import/git/gcc-test-intel64/bld/x86_64-unknown-linux-gnu/32/libjava/.libs/libgcj.so.14
so try adding it to the linker command line^M
/export/gnu/import/git/gcc-test-intel64/bld/x86_64-unknown-linux-gnu/32/libjava/.libs/libgcj.so.14:
could not read symbols: Invalid operation^M
collect2: error: ld returned 1 exit status^M
compiler exited with status 1

_Jv_RegisterClasses is weak reference and libgcj.so isn't on the
linker command line. Since libgcj.so isn't on the linker command line,
gold resolves _Jv_RegisterClasses to 0 and the old bfd linker silently
resolves it to _Jv_RegisterClasses in libgcj.so.  Now executable
generated by gold and ld behaves differently:

[hjl@gnu-13 testsuite]$ readelf -sW /tmp/PR16923.gold | grep
_Jv_RegisterClasses 
 8:  0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
37:  0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
[hjl@gnu-13 testsuite]$ readelf -sW /tmp/PR16923.bfd | grep _Jv_RegisterClasses 
 9: 004005e0 0 FUNCWEAK   DEFAULT  UND _Jv_RegisterClasses
59: 004005e0 0 FUNCWEAK   DEFAULT  UND _Jv_RegisterClasses

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15126] [REGRESSION] 2.23.51.0.9 fails to link cairo with libstdc++ (could not read symbols: Invalid operation)

2013-02-15 Thread uzytkownik2 at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15126

Maciej Piechotka  changed:

   What|Removed |Added

 Status|WAITING |UNCONFIRMED
 Ever Confirmed|1   |0

--- Comment #6 from Maciej Piechotka  2013-02-16 
00:36:43 UTC ---
(In reply to comment #4)
> Please double check if it is a real regression. I think it is a bug,
> not a regression.

Sorry for delay. When I posted bug I tried binutils 2.23.51.0.8, 2.23.51.0.9
and 2.23.1. The only change was the version of binutils installed - in all
cases but 2.23.51.0.9 linking succeeded.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug ld/15126] [REGRESSION] 2.23.51.0.9 fails to link cairo with libstdc++ (could not read symbols: Invalid operation)

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15126

--- Comment #7 from H.J. Lu  2013-02-16 01:37:22 
UTC ---
(In reply to comment #6)
> (In reply to comment #4)
> > Please double check if it is a real regression. I think it is a bug,
> > not a regression.
> 
> Sorry for delay. When I posted bug I tried binutils 2.23.51.0.8, 2.23.51.0.9
> and 2.23.1. The only change was the version of binutils installed - in all
> cases but 2.23.51.0.9 linking succeeded.

Please do

1. Install binutils 2.23.51.0.9
2. Configure and build cairo.  It will fail.
3. Install binutils 2.23.51.0.8.
4. Go to cairo build directory without reconfigure and try the
failed command by hand.
4. Install binutils 2.23.1.
5. Go to cairo build directory without reconfigure and try the
failed command by hand.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils


[Bug gold/15153] New: gold fails to detect undefined symbol

2013-02-15 Thread hjl.tools at gmail dot com
http://sourceware.org/bugzilla/show_bug.cgi?id=15153

 Bug #: 15153
   Summary: gold fails to detect undefined symbol
   Product: binutils
   Version: 2.24 (HEAD)
Status: NEW
  Severity: normal
  Priority: P2
 Component: gold
AssignedTo: i...@airs.com
ReportedBy: hjl.to...@gmail.com
CC: ccout...@google.com
Classification: Unclassified


gold fails to detect undefined symbol:

[hjl@gnu-6 xxx]$ cat foo.c
extern int xxx __attribute__((weak));

extern void bar ();

int
main ()
{
  bar ();
  return xxx;
}
[hjl@gnu-6 xxx]$ cat yyy.c
extern int xxx;

int
bar (void)
{
  return xxx;
}
[hjl@gnu-6 xxx]$ make
gcc -Wl,--no-copy-dt-needed-entries-c -o foo.o foo.c
gcc -Wl,--no-copy-dt-needed-entries -shared -fPIC -o libyyy.so yyy.c
gcc -Wl,--no-copy-dt-needed-entries -fuse-ld=gold -B./
-Wl,--no-allow-shlib-undefined -o y foo.o libyyy.so -Wl,-rpath,.
./y
./y: symbol lookup error: ./libyyy.so: undefined symbol: xxx
make: *** [all] Error 127
[hjl@gnu-6 xxx]$ 

ld detects the error:

[hjl@gnu-6 xxx]$ make x
gcc -Wl,--no-copy-dt-needed-entries -B./ -Wl,--no-allow-shlib-undefined -o x
foo.o libyyy.so -Wl,-rpath,.
foo.o: In function `main':
foo.c:(.text+0x10): undefined reference to `xxx'
collect2: error: ld returned 1 exit status
make: *** [x] Error 1
[hjl@gnu-6 xxx]$

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
--- You are receiving this mail because: ---
You are on the CC list for the bug.

___
bug-binutils mailing list
bug-binutils@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-binutils