Skip to content

Commit 27c7140

Browse files
committed
libosv.so: fix warnings on truncated symbol names
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 <[email protected]>
1 parent dbc9798 commit 27c7140

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1864,7 +1864,7 @@ $(out)/loader.elf: $(stage1_targets) arch/$(arch)/loader.ld $(out)/bootfs.o $(lo
18641864
LINK loader.elf)
18651865
@# Build libosv.so matching this loader.elf. This is not a separate
18661866
@# rule because that caused bug #545.
1867-
@readelf --dyn-syms $(out)/loader.elf > $(out)/osv.syms
1867+
@readelf --dyn-syms --wide $(out)/loader.elf > $(out)/osv.syms
18681868
@scripts/libosv.py $(out)/osv.syms $(out)/libosv.ld `scripts/osv-version.sh` | $(CC) -c -o $(out)/osv.o -x assembler -
18691869
$(call quiet, $(CC) $(out)/osv.o -nostdlib -shared -o $(out)/libosv.so -T $(out)/libosv.ld, LIBOSV.SO)
18701870

0 commit comments

Comments
 (0)