The code in Makefile which builds the esoteric libosv.so library used
"readelf" to get a list of symbols from the kernel. However, readelf by
default truncates the symbol names after some limit (this default is *not*
documented, unfortunately), and some very long (mangled) symbol names get
truncated to the same string, which leads us to add this symbol trice to
libosv.so and get warnings from the assembler.
The fix is to pass the "--wide" option to readelf, which causes it not to
truncate symbol names.
Fixes #1083.
Signed-off-by: Nadav Har'El <
n...@scylladb.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index db3c68cf..20ddf3b1 100644
--- a/Makefile
+++ b/Makefile
@@ -1864,7 +1864,7 @@ $(out)/loader.elf: $(stage1_targets) arch/$(arch)/loader.ld $(out)/bootfs.o $(lo
LINK loader.elf)
@# Build libosv.so matching this loader.elf. This is not a separate
@# rule because that caused bug #545.
- @readelf --dyn-syms $(out)/loader.elf > $(out)/osv.syms
+ @readelf --dyn-syms --wide $(out)/loader.elf > $(out)/osv.syms
@scripts/libosv.py $(out)/osv.syms $(out)/libosv.ld `scripts/osv-version.sh` | $(CC) -c -o $(out)/osv.o -x assembler -
$(call quiet, $(CC) $(out)/osv.o -nostdlib -shared -o $(out)/libosv.so -T $(out)/libosv.ld, LIBOSV.SO)
--
2.26.2