> On 31. Mar 2023, at 16:39, Ni, Ray <ray...@intel.com> wrote: > > > >> -----Original Message----- >> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Marvin >> Häuser >> Sent: Friday, March 31, 2023 7:10 PM >> To: Ard Biesheuvel <a...@kernel.org> >> Cc: Ni, Ray <ray...@intel.com>; devel@edk2.groups.io; Andrew Fish >> <af...@apple.com>; Kinney, Michael D <michael.d.kin...@intel.com>; Liu, >> Zhiguang <zhiguang....@intel.com>; Rebecca Cran <rebe...@bsdio.com>; >> Tom Lendacky <thomas.lenda...@amd.com> >> Subject: Re: [edk2-devel] [RFT PATCH v3 0/5] UefiCpuPkg, OvmfPkg: Simplify >> CpuExceptionHandlerLib >> >> >>> On 31. Mar 2023, at 13:03, Ard Biesheuvel <a...@kernel.org> wrote: >>> >>> On Fri, 31 Mar 2023 at 12:41, Marvin Häuser <mhaeu...@posteo.de> wrote: >>>> >>>> Hi Ray, >>>> >>>>>> On 31. Mar 2023, at 12:09, Ni, Ray <ray...@intel.com> wrote: >>>>> >>>>> Ard, >>>>> What does "-read_only_relocs suppress" control? >>>> >>>> It controls whether relocs that target read-only segments yield a build >> error or not. I think lld uses “-z notext”. >>>> >>>>> Linker doesn't produce relocation entries that modifies .text section >> silently >>>>> so the final .text just cannot run at all? >>>> >>>> Could you please rephrase? I’m not sure I understand, but I think it’s >> important everyone understands the issues at play to make a good judgment >> call. >>>> >>> >>> As *I* understood it, it means suppress the *warning* not suppress the >>> *relocation* > > What the meaning of "suppress relocation"?
The option naming is just a bit odd, it suppresses the warning about relocations to read-only segments, not the relocations themselves. > Why the final binaries are not executable? I explained that here: https://edk2.groups.io/g/devel/message/102219 TL;dr: Relocations are relative to the first writable segment (thus usually __DATA), so relocations to preceding segments (usually __TEXT) will underflow and thus get corrupted offsets. Best regards, Marvin > >> >> Correct. >> >>> >>> But the resulting binaries are broken, so it doesn't really matter. >> >> >> >> >> > -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#102315): https://edk2.groups.io/g/devel/message/102315 Mute This Topic: https://groups.io/mt/97969646/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-