]> xenbits.xensource.com Git - xen.git/commit
x86/mm: avoid building multiple .o from a single .c file
authorAnthony PERARD <anthony.perard@citrix.com>
Tue, 12 Oct 2021 09:48:46 +0000 (11:48 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 12 Oct 2021 09:48:46 +0000 (11:48 +0200)
commit71cf7634fa11038fd9a2aa471a1dc7714bb93e79
treedc166067ab9ddd3d9c612ee138de416f8283c4f2
parente26f810a6f9295afe30ea08195715ddd96e2a123
x86/mm: avoid building multiple .o from a single .c file

This replace the use of a single .c file use for multiple .o file by
creating multiple .c file including the first one.

There's quite a few issues with trying to build more than one object
file from a single source file: there's is a duplication of the make
rules to generate those targets; there is an additional ".file" symbol
added in order to differentiate between the object files; and the
tools/symbols have an heuristic to try to pick up the right ".file".

This patch adds new .c source file which avoid the need to add a
second ".file" symbol and thus avoid the need to deal with those
issues.

Also remove __OBJECT_FILE__ from $(CC) command line as it isn't used
anywhere anymore. And remove the macro "build-intermediate" since the
generic rules for single targets can be used.

And rename the objects in mm/hap/ to remove the extra "level".

Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
18 files changed:
xen/Makefile
xen/Rules.mk
xen/arch/x86/mm/Makefile
xen/arch/x86/mm/guest_walk.c
xen/arch/x86/mm/guest_walk_2.c [new file with mode: 0644]
xen/arch/x86/mm/guest_walk_3.c [new file with mode: 0644]
xen/arch/x86/mm/guest_walk_4.c [new file with mode: 0644]
xen/arch/x86/mm/hap/Makefile
xen/arch/x86/mm/hap/guest_walk.c
xen/arch/x86/mm/hap/guest_walk_2.c [new file with mode: 0644]
xen/arch/x86/mm/hap/guest_walk_3.c [new file with mode: 0644]
xen/arch/x86/mm/hap/guest_walk_4.c [new file with mode: 0644]
xen/arch/x86/mm/shadow/Makefile
xen/arch/x86/mm/shadow/guest_2.c [new file with mode: 0644]
xen/arch/x86/mm/shadow/guest_3.c [new file with mode: 0644]
xen/arch/x86/mm/shadow/guest_4.c [new file with mode: 0644]
xen/arch/x86/mm/shadow/multi.c
xen/tools/symbols.c