[PATCH v1 1/4] common.h: Flush stdout before writing to stderr

2023-01-19 Thread Mihails Strasuns
Flush existing debug messages before writing an error to stderr. stderr is usually unbuffered and stdout is usually buffered. This results in odd looking output when an error occurs and both stderr/stdout are printed on the same console/file. More precisely, the error message is printed in the mid

[PATCH v1 3/4] livepatch-gcc: Ignore buildid.o

2023-01-19 Thread Mihails Strasuns
From: Raphael Ning Not all .o files generated by the Xen build need to be passed to create-diff-object for analysis. The latest example is: Run create-diff-object on xen/arch/x86/efi/buildid.o Open base /usr/libexec/livepatch-build-tools/create-diff-object: ERROR: buildid.o: kpatch_create_se

[PATCH v1 4/4] create-diff-object: Add new symbols for relocation aliases

2023-01-19 Thread Mihails Strasuns
s duplicates of all referenced symbols with the scope set to SHN_ABS and the address to the one resolved from xen-syms. This new symbol is prefixed with a unique string to generate a new name. This forces all calls to be directed to the original function which contains the trampoline. Signed-of

[PATCH v1 2/4] livepatch-build: Allow a patch to introduce new subdirs

2023-01-19 Thread Mihails Strasuns
From: Raphael Ning Fix a bug in create_patch() where cp, strip, etc. will fail if the new object file introduced by the patch is located in a new subdirectory: DEBUG: cp: cannot create regular file `output/xen/common/lu/lu.o': No such file or directory DEBUG: strip: 'output/xen/common/lu/lu.o

[PATCH v1 0/4] Collection of livepatch-build-tools tweaks

2023-01-19 Thread Mihails Strasuns
): common.h: Flush stdout before writing to stderr Raphael Ning (2): livepatch-build: Allow a patch to introduce new subdirs livepatch-gcc: Ignore buildid.o Stanislav Uschakow / Mihails Strasuns (1): create-diff-object: Add new symbols for relocation aliases common.h | 1