bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug binutils/17840] New: [2.25 Regression] ar creates archives with inc


From: danglin at gcc dot gnu.org
Subject: [Bug binutils/17840] New: [2.25 Regression] ar creates archives with incorrect LST system_id and magic
Date: Tue, 13 Jan 2015 20:20:05 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=17840

            Bug ID: 17840
           Summary: [2.25 Regression] ar creates archives with incorrect
                    LST system_id and magic
           Product: binutils
           Version: 2.25
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: danglin at gcc dot gnu.org

With 2.25, ar creates archive files with am incorrect LST header on
hppa2.0w-hp-hpux11.11.  This causes problems with HP ld and earlier
versions of ar (e.g., 2.23.2).

First, the file command doesn't show the type of archive:

-bash-4.3$ file libgnu.a
libgnu.a:       archive file
-bash-4.3$ file libc.a
libc.a:         archive file -PA-RISC1.1 relocatable library

-bash-4.3$ /opt/gnu/bin/ar tv libgnu.a
/opt/gnu/bin/ar: libgnu.a: File format not recognized
-bash-4.3$ /opt/gnu/bin/ar --version
GNU ar (GNU Binutils) 2.23.2
Copyright 2012 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

Strangely, the above works with 2.25:

-bash-4.3$ /xxx/gnu/binutils-2.25/objdir/binutils/ar tv libgnu.a
rw-r--r-- 2/2  12455 Jan 12 20:43 2015 base32.o
rw-r--r-- 2/2   4920 Jan 12 20:43 2015 binary-io.o
rw-r--r-- 2/2   4320 Jan 12 20:43 2015 c-ctype.o
rw-r--r-- 2/2    902 Jan 12 20:43 2015 c-strcasecmp.o
rw-r--r-- 2/2    966 Jan 12 20:43 2015 c-strncasecmp.o
rw-r--r-- 2/2   5317 Jan 12 20:43 2015 cloexec.o
rw-r--r-- 2/2  21687 Jan 12 20:43 2015 md5.o
rw-r--r-- 2/2  29655 Jan 12 20:43 2015 sha1.o
rw-r--r-- 2/2   4752 Jan 12 20:44 2015 dirname-lgpl.o
rw-r--r-- 2/2   1156 Jan 12 20:44 2015 basename-lgpl.o
rw-r--r-- 2/2    885 Jan 12 20:44 2015 stripslash.o
rw-r--r-- 2/2   3895 Jan 12 20:44 2015 exitfail.o
rw-r--r-- 2/2   8146 Jan 12 20:44 2015 fatal-signal.o
rw-r--r-- 2/2   3846 Jan 12 20:44 2015 fd-hook.o
rw-r--r-- 2/2   4353 Jan 12 20:44 2015 fd-safer-flag.o
rw-r--r-- 2/2   4991 Jan 12 20:44 2015 dup-safer-flag.o
rw-r--r-- 2/2    766 Jan 12 20:44 2015 gettime.o
rw-r--r-- 2/2   8288 Jan 12 20:44 2015 localcharset.o
rw-r--r-- 2/2   6749 Jan 12 20:44 2015 lock.o
rw-r--r-- 2/2   4980 Jan 12 20:44 2015 mbchar.o
rw-r--r-- 2/2   5744 Jan 12 20:44 2015 mbiter.o
rw-r--r-- 2/2   5679 Jan 12 20:44 2015 pipe2.o
rw-r--r-- 2/2   4519 Jan 12 20:44 2015 pipe2-safer.o
rw-r--r-- 2/2  22649 Jan 12 20:44 2015 quotearg.o
rw-r--r-- 2/2    736 Jan 12 20:44 2015 sig-handler.o
rw-r--r-- 2/2    787 Jan 12 20:44 2015 sockets.o
rw-r--r-- 2/2   9634 Jan 12 20:44 2015 spawn-pipe.o
rw-r--r-- 2/2   2799 Jan 12 20:44 2015 stat-time.o
rw-r--r-- 2/2    811 Jan 12 20:44 2015 strnlen1.o
rw-r--r-- 2/2   4761 Jan 12 20:44 2015 sys_socket.o
rw-r--r-- 2/2   7587 Jan 12 20:44 2015 tempname.o
rw-r--r-- 2/2   5153 Jan 12 20:44 2015 threadlib.o
rw-r--r-- 2/2   1558 Jan 12 20:44 2015 timespec.o
rw-r--r-- 2/2   6257 Jan 12 20:44 2015 tmpdir.o
rw-r--r-- 2/2   3846 Jan 12 20:44 2015 unistd.o
rw-r--r-- 2/2   4980 Jan 12 20:44 2015 dup-safer.o
rw-r--r-- 2/2   4320 Jan 12 20:44 2015 fd-safer.o
rw-r--r-- 2/2   4484 Jan 12 20:44 2015 pipe-safer.o
rw-r--r-- 2/2   4686 Jan 12 20:44 2015 width.o
rw-r--r-- 2/2   7806 Jan 12 20:44 2015 utimens.o
rw-r--r-- 2/2   7431 Jan 12 20:44 2015 wait-process.o
rw-r--r-- 2/2   3846 Jan 12 20:44 2015 wctype-h.o
rw-r--r-- 2/2   7161 Jan 12 20:44 2015 xmalloc.o
rw-r--r-- 2/2   4329 Jan 12 20:44 2015 xalloc-die.o
rw-r--r-- 2/2   1424 Jan 12 20:44 2015 xsize.o
rw-r--r-- 2/2    818 Jan 12 20:44 2015 xstrndup.o
rw-r--r-- 2/2    824 Jan 12 20:44 2015 asnprintf.o
rw-r--r-- 2/2   2403 Jan 12 20:44 2015 asprintf.o
rw-r--r-- 2/2   8393 Jan 12 20:44 2015 error.o
rw-r--r-- 2/2   5874 Jan 12 20:44 2015 fcntl.o
rw-r--r-- 2/2   1419 Jan 12 20:44 2015 futimens.o
rw-r--r-- 2/2   4984 Jan 12 20:44 2015 gai_strerror.o
rw-r--r-- 2/2   5119 Jan 12 20:44 2015 getdelim.o
rw-r--r-- 2/2   2353 Jan 12 20:44 2015 getline.o
rw-r--r-- 2/2  17234 Jan 12 20:44 2015 getopt.o
rw-r--r-- 2/2   5192 Jan 12 20:44 2015 getopt1.o
rw-r--r-- 2/2   5606 Jan 12 20:44 2015 getpass.o
rw-r--r-- 2/2   3203 Jan 12 20:44 2015 localeconv.o
rw-r--r-- 2/2   1995 Jan 12 20:44 2015 lstat.o
rw-r--r-- 2/2   4732 Jan 12 20:44 2015 mbrtowc.o
rw-r--r-- 2/2   5230 Jan 12 20:44 2015 mbsrtowcs.o
rw-r--r-- 2/2   3890 Jan 12 20:44 2015 mbsrtowcs-state.o
rw-r--r-- 2/2   1237 Jan 12 20:44 2015 memrchr.o
rw-r--r-- 2/2   4093 Jan 12 20:44 2015 mkostemp.o
rw-r--r-- 2/2   4068 Jan 12 20:44 2015 mkstemp.o
rw-r--r-- 2/2   9627 Jan 12 20:44 2015 mktime.o
rw-r--r-- 2/2   5914 Jan 12 20:44 2015 open.o
rw-r--r-- 2/2   5963 Jan 12 20:44 2015 printf-args.o
rw-r--r-- 2/2  13382 Jan 12 20:44 2015 printf-parse.o
rw-r--r-- 2/2   1072 Jan 12 20:44 2015 rawmemchr.o
rw-r--r-- 2/2 187460 Jan 12 20:44 2015 regex.o
rw-r--r-- 2/2   3998 Jan 12 20:44 2015 secure_getenv.o
rw-r--r-- 2/2   4638 Jan 12 20:44 2015 snprintf.o
rw-r--r-- 2/2   4425 Jan 12 20:44 2015 spawn_faction_addclose.o
rw-r--r-- 2/2   4497 Jan 12 20:44 2015 spawn_faction_adddup2.o
rw-r--r-- 2/2   4521 Jan 12 20:44 2015 spawn_faction_addopen.o
rw-r--r-- 2/2   4084 Jan 12 20:44 2015 spawn_faction_destroy.o
rw-r--r-- 2/2   4464 Jan 12 20:44 2015 spawn_faction_init.o
rw-r--r-- 2/2    652 Jan 12 20:44 2015 spawnattr_destroy.o
rw-r--r-- 2/2    718 Jan 12 20:44 2015 spawnattr_init.o
rw-r--r-- 2/2    735 Jan 12 20:44 2015 spawnattr_setflags.o
rw-r--r-- 2/2    755 Jan 12 20:44 2015 spawnattr_setsigmask.o
rw-r--r-- 2/2   9153 Jan 12 20:44 2015 spawni.o
rw-r--r-- 2/2    856 Jan 12 20:44 2015 spawnp.o
rw-r--r-- 2/2   1866 Jan 12 20:44 2015 stat.o
rw-r--r-- 2/2   1263 Jan 12 20:44 2015 strchrnul.o
rw-r--r-- 2/2   4680 Jan 12 20:44 2015 strerror.o
rw-r--r-- 2/2    848 Jan 12 20:44 2015 strerror-override.o
rw-r--r-- 2/2   5660 Jan 12 20:44 2015 strerror_r.o
rw-r--r-- 2/2   4263 Jan 12 20:44 2015 strndup.o
rw-r--r-- 2/2    798 Jan 12 20:44 2015 strnlen.o
rw-r--r-- 2/2   6213 Jan 12 20:44 2015 strtoll.o
rw-r--r-- 2/2   1309 Jan 12 20:44 2015 time_r.o
rw-r--r-- 2/2    920 Jan 12 20:44 2015 timegm.o
rw-r--r-- 2/2  31419 Jan 12 20:44 2015 vasnprintf.o
rw-r--r-- 2/2   4332 Jan 12 20:44 2015 vasprintf.o
rw-r--r-- 2/2   4573 Jan 12 20:44 2015 vsnprintf.o
-bash-4.3$ /xxx/gnu/binutils-2.25/objdir/binutils/ar --version
GNU ar (GNU Binutils) 2.25
Copyright (C) 2014 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) any later version.
This program has absolutely no warranty.

-bash-4.3$ od -x libgnu.a|less
0000000 213c 6172 6368 3e0a 2f20 2020 2020 2020
0000020 2020 2020 2020 2020 3134 3231 3132 3134
0000040 3439 2020 3020 2020 2020 3020 2020 2020
0000060 3020 2020 2020 2020 3433 3630 2020 2020
0000100 2020 600a 0000 00e4 0000 1292 0000 1292
-bash-4.3$ od -x libc.a|less
0000000 213c 6172 6368 3e0a 2f20 2020 2020 2020
0000020 2020 2020 2020 2020 3132 3736 3032 3435
0000040 3336 2020 3020 2020 2020 3020 2020 2020
0000060 3020 2020 2020 2020 3138 3338 3434 2020
0000100 2020 600a 0210 0619 0512 4000 0000 0000

The LST header starts with the "0210 0619" in the above hex dumps.  It's
not clear how the "0000 00e4" system_id and magic values were generated.
However, it suggests som_slurp_armap() and som_write_armap() aren't being
called.

-- 
You are receiving this mail because:
You are on the CC list for the bug.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]