[syslinux] [PATCH 3/3] Pass --wide to readelf to avoid truncating symbol names
Josh Triplett
josh at joshtriplett.org
Sat Apr 17 12:36:24 PDT 2021
Current versions of readelf truncate symbol names to fit in 80
characters, even when not sending output to a terminal. Pass the --wide
option to prevent this.
Without this, the truncation marker would end up in the generated
libcore.S assembly file, resulting in lines like this:
.globl __syslinux_core_[...]
__syslinux_core_[...] = 0x00008862
.type __syslinux_core_[...], STT_OBJECT
.size __syslinux_core_[...], 2
And errors like this:
libcore.S: Assembler messages:
libcore.S:203: Error: junk at end of line, first unrecognized character is `['
libcore.S:204: Error: invalid character '[' in mnemonic
libcore.S:205: Error: unrecognized symbol type ""
libcore.S:205: Error: junk at end of line, first unrecognized character is `['
libcore.S:206: Error: expected comma after name `__syslinux_core_' in .size directive
Signed-off-by: Josh Triplett <josh at joshtriplett.org>
---
core/export.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/core/export.pl b/core/export.pl
index 16c63dbf..ad7d1528 100755
--- a/core/export.pl
+++ b/core/export.pl
@@ -22,7 +22,7 @@ my %fsyms; # Files in which this symbol occurs
my $readelf = $ENV{'READELF'} || 'readelf';
foreach my $infile (@infiles) {
- open(my $in, '-|', $readelf, '--dyn-syms', $infile)
+ open(my $in, '-|', $readelf, '--wide', '--dyn-syms', $infile)
or die "$0: $infile: $!\n";
while (my $line = <$in>) {
--
2.31.0
More information about the Syslinux
mailing list