mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
build: move $(compare-symbol-tables)
With the final linking logic now consolidated in scripts/Makefile.link, $(compare-symbol-tables) also doesn't need setting anymore in Kbuild.include. Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Anthony PERARD <anthony.perard@vates.tech>
This commit is contained in:
1 parent
0a609dc49a
commit
06438aead6
2 files changed
+12
-13
No files matched your search
@@ -56,19 +56,6 @@ define filechk
|
||||
fi
|
||||
endef
|
||||
|
||||
###
|
||||
# Compare the symbol tables of two object files. As diff's -I option isn't
|
||||
# standardized, the name difference of the two object files needs abstracting
|
||||
# out.
|
||||
define compare-symbol-tables
|
||||
ln -f $(1) $(@D)/.cst.$$$$; \
|
||||
$(OBJDUMP) -t $(@D)/.cst.$$$$ > $(1).sym; \
|
||||
ln -f $(2) $(@D)/.cst.$$$$; \
|
||||
$(OBJDUMP) -t $(@D)/.cst.$$$$ > $(2).sym; \
|
||||
rm -f $(@D)/.cst.$$$$; \
|
||||
diff -u $(1).sym $(2).sym
|
||||
endef
|
||||
|
||||
# as-insn: Check whether assembler supports an instruction.
|
||||
# Usage: cflags-y += $(call as-insn,CC FLAGS,"insn",option-yes,option-no)
|
||||
as-insn = $(if $(shell echo 'void _(void) { asm volatile ( $(2) ); }' \
|
||||
|
||||
@@ -33,6 +33,18 @@ final-image-check-y ?= true
|
||||
$(if $(filter $(LAST_LINKING_PASS),$*), $(syms-warn-dup-y)) \
|
||||
> $@
|
||||
|
||||
# Compare the symbol tables of two object files. As diff's -I option isn't
|
||||
# standardized, the name difference of the two object files needs abstracting
|
||||
# out.
|
||||
define compare-symbol-tables
|
||||
ln -f $(1) $(@D)/.cst.$$$$; \
|
||||
$(OBJDUMP) -t $(@D)/.cst.$$$$ > $(1).sym; \
|
||||
ln -f $(2) $(@D)/.cst.$$$$; \
|
||||
$(OBJDUMP) -t $(@D)/.cst.$$$$ > $(2).sym; \
|
||||
rm -f $(@D)/.cst.$$$$; \
|
||||
diff -u $(1).sym $(2).sym
|
||||
endef
|
||||
|
||||
.$(TARGET)-syms.%: $(objtree)/prelink.o .$(TARGET)-syms.%.o $(obj)/xen.lds
|
||||
$(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $(filter %.o,$^) \
|
||||
$(build_id_linker) --strip-debug -o $@
|
||||
|
||||