bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/28917] New: ar: r does not replace objects specified multi


From: vapier at gentoo dot org
Subject: [Bug binutils/28917] New: ar: r does not replace objects specified multiple times on the command line
Date: Mon, 21 Feb 2022 19:43:19 +0000

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

            Bug ID: 28917
           Summary: ar: r does not replace objects specified multiple
                    times on the command line
           Product: binutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: vapier at gentoo dot org
  Target Milestone: ---

testing current tree (216722984fec8aa76e2d97d7b8fcc2fb1608825b).  seems to
reproduce across many diff targets & config options, so i don't think they're
related.

$ cd binutils

# Adding files one-at-a-time works correctly.
$ rm -f x.a
$ ./ar vrc x.a ar.o
a - ar.o
$ ./ar vrc x.a ar.o
r - ar.o
$ ./ar vrc x.a ar.o
r - ar.o
$ ./ar t x.a
ar.o

# Adding files many-at-a-time works incorrectly.
$ rm -f x.a
$ ./ar vrc x.a ar.o ar.o
a - ar.o
a - ar.o
$ ar t x.a
ar.o
ar.o

this came up because newlib uses archive-insertion-order to control overriding
of common objects (i.e. C files) with machine-specific objects (i.e. asm
files).  it used to add objects one directory at a time, but i switched it to
add them all at once (with machine objects appearing last).  now we have
duplicate objects in the archive.

-- 
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]