|
From: | Andrew Pullin |
Subject: | Re: ar and objcopy stuck, failing on object name containing '/' inside an archive? |
Date: | Wed, 17 Nov 2021 12:26:40 -0800 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 |
Hi Nick, I filed a bug here: https://sourceware.org/bugzilla/show_bug.cgi?id=28485Per one of the replies, it seems like this might not be a "bug", but simply a difference in definitions between binutils and llvm definitions of the archive format. It loos like the llvm format has allowances for paths in files which the Open Group spec does not.
Without an extension in behavior definition (which would then go out-of-conformance with that spec), I don't think there is any way to resolve this.
Ultimately, I used the llvm variant of objcopy and was able to accomplish what I needed to do wrt modifying objects in the archive. But that does "make sense", since the original archive was emitted by llvm tools.
But the issue might come up in other places, as llvm and gcc try to coexist in software ecosystems. I am working in a sort-of special case here, with bare metal embedded on ARM, which (afaik) there is not an all-clang/llvm solution for yet.
- Andrew On 11/17/21 8:13 AM, Nick Clifton wrote:
Hi Andrew, [Sorry for taking such a long time to reply to your email]I am trying to localize some symbols in objects inside an archive.Ultimately, it seems like the tools are failing because the .a appears to contain an object with the name "bin/thumbv7em-none-eabihf.o".If you extract the object files, localize them one by one and then put them back, does the problem go away ?(In theory this should not make any difference at all, but you never know...)When I try to extract everything in the archive: arm-none-eabi-ar x librustlib.ait extracts all objects up to that problem object with the '/' in the name, but none after it.Is this a bug?Yes. :-) Either the extraction should complete with all of the files being retrieved or else an error message should be displayed and the exit status set to failure. Please could you file a bug report for this problem here: https://sourceware.org/bugzilla/enter_bug.cgi?product=binutils If you could include a copy of the archive, or simple instructions on how to create a similar one, that would help a lot. Cheers Nick
[Prev in Thread] | Current Thread | [Next in Thread] |