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

            Bug ID: 27349
           Summary: ar breaks symlinks
           Product: binutils
           Version: 2.36
            Status: NEW
          Severity: normal
          Priority: P2
         Component: binutils
          Assignee: unassigned at sourceware dot org
          Reporter: amodra at gmail dot com
  Target Milestone: ---

Since 014cc7f849

rm -f x.a xx.a x
ar cr xx.a
ln -s xx.a x.a
touch x
ls -l x x.a xx.a
-rw-r--r-- 1 alan alan 0 Feb  5 11:59 x
lrwxrwxrwx 1 alan alan 4 Feb  5 11:59 x.a -> xx.a
-rw-r--r-- 1 alan alan 8 Feb  5 11:59 xx.a
ar cr x.a x
ls -l x x.a xx.a
-rw-r--r-- 1 alan alan  0 Feb  5 11:59 x
-rw-r--r-- 1 alan alan 68 Feb  5 11:59 x.a
-rw-r--r-- 1 alan alan  8 Feb  5 11:59 xx.a

Dangling symlinks are similarly mishandled.  We really do need to lstat the
output file.  fstat on a file descriptor won't tell you anything about
symlinks.

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

Reply via email to