On 18/03/2025 5:35 pm, Roger Pau Monne wrote: > Relocations are now applied after having moved the trampoline, so there's no > reason to warn about relocations to read-only sections. The logic that > apply the relocations would make sure they are applied against writable > mappings. > > Signed-off-by: Roger Pau Monné <roger....@citrix.com> > --- > xen/arch/x86/efi/mkreloc.c | 5 ----- > 1 file changed, 5 deletions(-) > > diff --git a/xen/arch/x86/efi/mkreloc.c b/xen/arch/x86/efi/mkreloc.c > index 375cb79d6959..a5a1969f2ee5 100644 > --- a/xen/arch/x86/efi/mkreloc.c > +++ b/xen/arch/x86/efi/mkreloc.c > @@ -216,11 +216,6 @@ static void diff_sections(const unsigned char *ptr1, > const unsigned char *ptr2, > exit(3); > } > > - if ( !(sec->flags & IMAGE_SCN_MEM_WRITE) ) > - fprintf(stderr, > - "Warning: relocation to r/o section %.8s:%08" PRIxFAST32 > "\n", > - sec->name, i - disp); > - > printf("\t.word (%u << 12) | 0x%03" PRIxFAST32 "\n", > reloc, sec->rva + i - disp - rva); > reloc_size += 2;
I'm on the fence about this. Obviously we don't want a warning firing for good cases, but the trampoline is special where the relocation is to a R/O section but we don't apply the relocation in that position. Is it possible to limit this to only trampoline_{start,end} and keep the warning in general? ~Andrew