|
From: | Andrew Pullin |
Subject: | ar and objcopy stuck, failing on object name containing '/' inside an archive? |
Date: | Sat, 16 Oct 2021 14:02:39 -0700 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 |
Hi folks,
I am having a little bit of trouble with ar and objcopy.
Unsure if I am doing something that I should not expect the tools
to do, or encountering a bug.
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".
This all started from trying:
arm-none-eabi-objcopy --localize-hidden librustlib.a
So operations like:
arm-none-eabi-objcopy -L __aeabi_dcmpgt librustlib.a
result in the error:
arm-none-eabi-objcopy: stsJ3ObR/bin/thumbv7em-none-eabihf.o: No such file or directory
with apparently no change to the archive file.
The symbol is definitely in there:
arm-none-eabi-objdump -x librustlib.a
gives
compiler_builtins-2ff80b98fa64b741.compiler_builtins.6207f1bb-cgu.122.rcgu.o: file format elf32-littlearm
rw-r--r-- 0/0 10176 Dec 31 16:00 1969 compiler_builtins-2ff80b98fa64b741.compiler_builtins.6207f1bb-cgu.122.rcgu.o
architecture: armv7e-m, flags 0x00000011:
...
SYMBOL TABLE:
00000000 l df *ABS* 00000000 compiler_builtins.6207f1bb-cgu.122
00000000 l d .text.__aeabi_dcmpgt 00000000 .text.__aeabi_dcmpgt
...
00000000 g F .text.__aeabi_dcmpgt 00000078 .hidden __aeabi_dcmpgt
So the symbol is there, flagged as a Function, .hidden, but still
global.
Checking the contents of the archive:
arm-none-eabi-ar tv librustlib.a | grep thumbit does appear that something is there:
rw-r--r-- 0/0 22732 Dec 31 16:00 1969 bin/thumbv7em-none-eabihf.o
arm-none-eabi-ar x librustlib.ait extracts all objects up to that problem object with the '/' in the name, but none after it.
[Prev in Thread] | Current Thread | [Next in Thread] |