[PATCH v3 01/11] kvm: arm64: Partially link nVHE hyp code, simplify HYPCOPY

David Brazdil dbrazdil at google.com
Tue Sep 22 13:55:02 EDT 2020


> > +#define HYP_SECTION_NAME(NAME)	.hyp##NAME
> > +
> > +/* Defines an ELF hyp section from input section @NAME and its subsections. */
> > +#define HYP_SECTION(NAME) \
> > +	HYP_SECTION_NAME(NAME) : { *(NAME NAME##.[0-9a-zA-Z_]*) }
> 
> I still don't get why we can't just use NAME ## .* for the regex here. That
> matches what we do elsewhere for linker script wildcarding, e.g. .rodata.*,
> .init.text.* ...  in asm-generic/vmlinux.lds.h. Why is it different for
> these sections?

Shouldn't matter. I copied it from a script in the Clang LTO branch. Will align
it with what's in the main arm64 script.

> > +# 2) Compile linker script.
> > +$(obj)/hyp.lds: $(src)/hyp.lds.S FORCE
> > +	$(call if_changed_dep,cpp_lds_S)
> 
> You need a .gitignore file listing hyp.lds, otherwise some idiot will end
> up committing it. I definitely didn't do that when playing around with this
> series. Nope. Not at all.

Thanks for noticing, I never compile in-tree. Added



More information about the linux-arm-kernel mailing list