public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jan Beulich <jbeulich@suse.com>
To: "徐持恒 Xu Chiheng" <chiheng.xu@gmail.com>
Cc: Binutils <binutils@sourceware.org>
Subject: Re: [PATCH] binutils: partially revert 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8
Date: Fri, 18 Nov 2022 15:03:43 +0100	[thread overview]
Message-ID: <0a1b947f-8936-1b0e-4cda-cf2bd421c784@suse.com> (raw)
In-Reply-To: <CAPOVtOuQ3Xto+uoRVqfyWDuvqO=8XrL64+ujZHY+OsN81Q4E=A@mail.gmail.com>

(re-sending with binutils@ re-added to Cc; please don't send private
mail for stuff which belongs on the list)

On 18.11.2022 14:57, 徐持恒 Xu Chiheng wrote:
> x86_64-elf-g++ -c -O3 -ffreestanding -fno-builtin -fno-pic -m32
> -mcmodel=32 ...  kern/core/x64/head/start32.cpp -o
> kern/core/x64/head/start32.cpp.o
> x86_64-elf-objcopy -I elf32-i386 -O elf64-x86-64

Well, I saw no need to use -I, but otherwise that's what I did. Yet you
quoting the commands you issued still doesn't answer ...

> kern/core/x64/head/start32.cpp.o kern/core/x64/head/start32.cpp.o
> x86_64-elf-g++      -nostdlib -v -fuse-ld=bfd -Wl,-v,--verbose -Wl,-r
> kern/core/x64/head/start32.cpp.o ... -o head.o
> 
> 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.

... which objcopy you used. Iirc llvm/clang also provide one, for example.

Jan

  parent reply	other threads:[~2022-11-18 14:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-17 17:44 徐持恒 Xu Chiheng
2022-11-17 18:06 ` H.J. Lu
     [not found]   ` <SY4P282MB40478D0B56A396B9DF249BBE8A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-17 18:50     ` H.J. Lu
     [not found]       ` <SY4P282MB40470E7AC17968C86A8731488A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-17 19:11         ` H.J. Lu
     [not found]           ` <SY4P282MB40478BD7C68830B7DC5705358A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-17 19:51             ` H.J. Lu
     [not found]               ` <SY4P282MB404738CCE8DD452A63DA4B0B8A069@SY4P282MB4047.AUSP282.PROD.OUTLOOK.COM>
2022-11-18  9:37                 ` 徐持恒 Xu Chiheng
2022-11-18 10:01                   ` Jan Beulich
2022-11-18 10:24                     ` 徐持恒 Xu Chiheng
2022-11-18 10:34                       ` Jan Beulich
2022-11-18 10:45                         ` 徐持恒 Xu Chiheng
2022-11-18 13:31                           ` Jan Beulich
     [not found]                             ` <CAPOVtOuQ3Xto+uoRVqfyWDuvqO=8XrL64+ujZHY+OsN81Q4E=A@mail.gmail.com>
2022-11-18 14:03                               ` Jan Beulich [this message]
     [not found]                               ` <da40ede4-5f91-a35e-dcae-ab222f0d0cdf@suse.com>
     [not found]                                 ` <CAPOVtOsHOzBxx=1bCMgRP-DfWzJu_eS-5UaEj-q_F8p86R-q9g@mail.gmail.com>
2022-11-18 14:09                                   ` Jan Beulich
2022-11-18 14:14                                     ` 徐持恒 Xu Chiheng
2022-11-18 14:35                             ` 徐持恒 Xu Chiheng
2022-11-21  7:53                               ` Jan Beulich
2022-11-21  8:30                                 ` 徐持恒 Xu Chiheng
2022-11-21  8:50                                   ` 徐持恒 Xu Chiheng
2022-11-21  9:02                                   ` Jan Beulich
2022-11-21  9:06                                     ` Jan Beulich
2022-11-21  9:21                                     ` 徐持恒 Xu Chiheng
2022-11-21  9:52                                       ` Jan Beulich
2022-11-21 10:59                                         ` 徐持恒 Xu Chiheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0a1b947f-8936-1b0e-4cda-cf2bd421c784@suse.com \
    --to=jbeulich@suse.com \
    --cc=binutils@sourceware.org \
    --cc=chiheng.xu@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).