__crc_... is intended to be absolute
PATCH 1/1 __crc_... is intended to be absolute
i386 boot/compressed/relocs checks for absolute symbols and warns about unexpected ones. If you build with modversions, you get ~2500 warnings about __crc_<symbol>. These suckers are really absolute symbols - we do _not_ want to modify them on relocation.
They are generated by genksyms - EXPORT_... generates a weak alias, then genksyms produces an ld script with __crc_<symbol> = <checksum> and it's fed to ld to produce the final object file. Their only use is to match kernel and module at modprobe time; they _must_ be absolute.
boot/compressed/relocs has a whitelist of known absolute symbols, but it doesn't know about __crc_... stuff. As the result, we get shitloads of false positives on any ld(1) version.
--- arch/i386/boot/compressed/relocs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/i386/boot/compressed/relocs.c +2 -0
@@ -43,6 +43,8 @@ static int is_safe_abs_reloc(const char* sym_name)/* Match found */ return 1 ; } +if (strncmp (sym_name,"__crc_" ,6 ) ==0 ) +return 1 ;return 0 ; }
Signature · 1 line
1.5.0-rc2.GIT
Quoted 25 lines · Al Viro
i386 boot/compressed/relocs checks for absolute symbols and warns about unexpected ones. If you build with modversions, you get ~2500 warnings about __crc_<symbol>. These suckers are really absolute symbols - we do _not_ want to modify them on relocation.
They are generated by genksyms -
EXPORT_... generates a weak alias, then genksyms produces an ld script with __crc_<symbol> = <checksum> and it's fed to ld to produce the final object file. Their only use is to match kernel and module at modprobe time; they _must_ be absolute.boot/compressed/relocs has a whitelist of known absolute symbols, but it doesn't know about
__crc_... stuff. As the result, we get shitloads of false positives on any ld(1) version.Signed-off-by Al Viro <[email protected]>--- arch/i386/boot/compressed/relocs.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/i386/boot/compressed/relocs.c +0
-0
arch/i386/boot/compressed/relocs.c static int is_safe_abs_reloc(const char* sym_name) · line 49
Quoted 7 lines
arch/i386/boot/compressed/relocs.c +2
-0@@ -43,6 +43,8 @@ static int is_safe_abs_reloc(const char* sym_name)/* Match found */ return 1 ; } +if (strncmp (sym_name,"__crc_" ,6 ) ==0 ) +return 1 ;return 0 ; }
Thanks Viro. Sorry, I missed this case.
Thanks
Vivek