From: Jan Beulich <jbeulich@suse.com>
To: "徐持恒 Xu Chiheng" <chiheng.xu@gmail.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>,
"H.J. Lu" <hjl.tools@gmail.com>
Subject: Re: [PATCH] binutils: partially revert 17c6c3b99156fe82c1e637e1a5fd9f163ac788c8
Date: Mon, 21 Nov 2022 10:02:06 +0100 [thread overview]
Message-ID: <d249f4be-8a2f-7b52-9cc3-46bba829a899@suse.com> (raw)
In-Reply-To: <CAPOVtOvXtVgkhHMFekdX8=7DUhf9V4siKVO2Jdt8MD122N5PXA@mail.gmail.com>
On 21.11.2022 09:30, 徐持恒 Xu Chiheng wrote:
> On Mon, Nov 21, 2022 at 3:53 PM Jan Beulich <jbeulich@suse.com> wrote:
>>
>> you didn't actually demonstrate the behavior, could you please attach
>> both input and output objects you pass into / get out of objcopy?
>>
>
> x86_64-elf-g++ -c -O3
> -DGIT_COMMIT=\""01c3a0a4688485d80cd2bc12ceb06709de32f365"\"
> -ffreestanding -fno-builtin -fvisibility=hidden
> -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wall -Wextra
> -Werror -Wno-address -Wno-strict-aliasing -Wno-unused-parameter
> -Wno-unused-function -Wno-unused-variable -Wno-unused-but-set-variable
> -Wno-nonnull-compare -Wno-array-bounds -Wno-cast-function-type
> -Wno-stringop-overflow -Wno-implicit-fallthrough -march=x86-64
> -mno-red-zone -mno-80387 -mno-mmx -msse2 -fno-use-cxa-atexit
> -fno-rtti -fno-exceptions -fsized-deallocation -Woverloaded-virtual
> -Wnamespaces -Wtemplates -Wvirtual-inheritance -Wno-invalid-offsetof
> -Wno-pmf-conversions -MMD -MP -D__KernelGenius__
> -I/cygdrive/c/Users/Administrator/OS/os/include
> -I/cygdrive/c/Users/Administrator/OS/os/include/kernel/x64
> -I/cygdrive/c/Users/Administrator/OS/os/kern/include
> -I/cygdrive/c/Users/Administrator/OS/os/kern/core/x64/include
> -mtune=intel -mno-80387 -mno-mmx -mno-sse -mno-sse2 -mno-sse3
> -mno-ssse3 -mno-sse4 -mno-sse4a -mno-sse4.1 -mno-sse4.2 -mno-avx
> -mno-avx2 -mno-avx512f -mno-avx512pf -mno-avx512er -mno-avx512cd
> -mno-avx512vl -mno-avx512bw -mno-avx512dq -mno-avx512ifma
> -mno-avx512vbmi -mno-sha -mno-aes -mno-pclmul -mno-clflushopt
> -mno-clwb -mno-fsgsbase -mno-ptwrite -mno-rdrnd -mno-f16c -mno-fma
> -mno-pconfig -mno-wbnoinvd -mno-fma4 -mno-prfchw -mno-rdpid
> -mno-prefetchwt1 -mno-rdseed -mno-sgx -mno-xop -mno-lwp -mno-3dnow
> -mno-3dnowa -mno-popcnt -mno-abm -mno-adx -mno-bmi -mno-bmi2
> -mno-lzcnt -mno-fxsr -mno-xsave -mno-xsaveopt -mno-xsavec -mno-xsaves
> -mno-rtm -mno-hle -mno-tbm -mno-mwaitx -mno-clzero -mno-pku
> -mno-avx512vbmi2 -mno-avx512bf16 -mno-gfni -mno-vaes -mno-waitpkg
> -mno-vpclmulqdq -mno-avx512bitalg -mno-movdiri -mno-movdir64b
> -mno-enqcmd -mno-uintr -mno-tsxldtrk -mno-avx512vpopcntdq
> -mno-avx512vp2intersect -mno-avx5124fmaps -mno-avx512vnni -mno-avxvnni
> -mno-avx5124vnniw -mno-cldemote -mno-serialize -mno-amx-tile
> -mno-amx-int8 -mno-amx-bf16 -mno-hreset -mno-kl -mno-widekl -fno-pic
> -m32 -mcmodel=32
> /cygdrive/c/Users/Administrator/OS/os/kern/core/x64/head/start32.cpp
> -o kern/core/x64/head/start32.cpp.o.32
>
> x86_64-elf-objcopy -I elf32-i386 -O elf64-x86-64
> kern/core/x64/head/start32.cpp.o.32 kern/core/x64/head/start32.cpp.o
So how did you conclude start32.cpp.o uses RELA relocations? .rel.text
is SHT_REL, not SHT_RELA, and so are other .rel.* sections. Which
actually supports my suspicion that SHT_REL aren't correctly handled
when linking, perhaps first and foremost because the x86-64 ABI
specifies that only RELA relocations are to be used. Whether, in that
light, it is valid for objcopy to produce SHT_REL output without any
warning is another question.
Jan
next prev parent reply other threads:[~2022-11-21 9:02 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
[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 [this message]
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=d249f4be-8a2f-7b52-9cc3-46bba829a899@suse.com \
--to=jbeulich@suse.com \
--cc=binutils@sourceware.org \
--cc=chiheng.xu@gmail.com \
--cc=hjl.tools@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).