bug-binutils
[Top][All Lists]
Advanced

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

[Bug binutils/28485] ar and objcopy stuck,failing on object name contain


From: pullin at berkeley dot edu
Subject: [Bug binutils/28485] ar and objcopy stuck,failing on object name containing '/' inside an archive
Date: Thu, 21 Oct 2021 22:33:09 +0000

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

--- Comment #1 from Andrew Pullin <pullin at berkeley dot edu> ---
This appears to originate from here:
https://sourceware.org/git/?p=binutils-gdb.git;a=blob;f=binutils/ar.c;h=8885585ef7537450f0f0990a5eeea7eb16bcad8f;hb=refs/heads/master#l1157

As far as I can tell, there is no defined behavior for how archive files with a
path containing a directory should behavior with the ar utility.

afaik, `fopen()` has no facility for creating directories.

Notably, if I do `mkdir bin` first, then the observed "No such file or
directory" error will NOT be hit when using ar to extract, as now the pathname
becomes valid.

However: the issue remains with objcopy, since it apparently uses a temporary
directory when doing an operation like `--localize-hidden`.

Also of note:
This appears to arise due to this archive file being created with `llvm-ar`,
which does explicitely allow slashes in path name:

https://releases.llvm.org/2.8/docs/CommandGuide/html/llvm-ar.html#:~:text=The%20path%20name%20is%20null%20terminated%20and%20may%20contain%20the%20slash%20(/)%20character.

Using llvm-objcopy yields different behavior: the --localize-hidden operation
succeeds without issue, despite the pathname containing a `/`

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