[PATCH] binutils: partially revert 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8

Jan Beulich jbeulich@suse.com
Mon Nov 21 07:53:57 GMT 2022


On 18.11.2022 15:35, 徐持恒 Xu Chiheng wrote:
> On Fri, Nov 18, 2022 at 9:31 PM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> On 18.11.2022 11:45, 徐持恒 Xu Chiheng wrote:
>>> using x86_64-elf-g++ -m32 -c on C++ files to generate head.o(32 bit
>>> code, elf32).
>>> using x86_64-elf-objcopy to convert it to elf64.
>>> then link head.o(32 bit code, elf64) with other object files(64 bit
>>> code, elf64).
>>>
>>> link script line is :
>>>   .head           : { head.o (.multiboot) head.o (.*) }
>>
>> Was that GNU objcopy you used? I've just tried here, and I don't see
>> it converting from REL to RELA.
>>
> 
> x86_64-elf-objcopy -I elf32-i386 -O elf64-x86-64
> kern/core/x64/head/start32.cpp.o kern/core/x64/head/start32.cpp.o

Okay, I've tried with 2.36.1 as well and I've also added the (in
principle unnecessary) -I option, but no difference. One reason for
the differing behavior may be that, judging by the naming of the tool
you use, you may have configured for x86_64-elf, whereas I'm using
x86_64-linux. I might be suspecting misbehavior elsewhere, and since
you didn't actually demonstrate the behavior, could you please attach
both input and output objects you pass into / get out of objcopy?

Jan


More information about the Binutils mailing list