mkelf32: fix compilation on 32 bit build host
PATCH 1/1 mkelf32: fix compilation on 32 bit build host
When cross-compiling xen on a 32 bit build host:
boot/mkelf32.c: In function 'main':boot/mkelf32.c:360:21: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'Elf64_Off' [-Werror=format]
cc1: all warnings being treated as errors
Fix that by using PRId64 in format string.
--- xen/arch/x86/boot/mkelf32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
xen/arch/x86/boot/mkelf32.c +1 -1
@@ -356,7 +356,7 @@ int main(int argc, char **argv)if ( in64_phdr.p_offset > dat_siz || offset > in64_phdr.p_offset ) {fprintf (stderr,"Expected .note section within .text section!\n" \ -"Offset %ld not within %d!\n" , +"Offset %" PRId64" not within %d!\n" , in64_phdr.p_offset, dat_siz);return 1 ; }
Signature · 7 lines
2.1.4 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 9 lines · Wei Liu
When cross-compiling xen on a 32 bit build host:
boot/mkelf32.c: In function 'main':boot/mkelf32.c:360:21: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'Elf64_Off' [-Werror=format]
cc1: all warnings being treated as errorsFix that by using PRId64 in format string.
Signed-off-by Wei Liu <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 9 lines · Wei Liu
When cross-compiling xen on a 32 bit build host:
boot/mkelf32.c: In function 'main':boot/mkelf32.c:360:21: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'Elf64_Off' [-Werror=format]
cc1: all warnings being treated as errorsFix that by using PRId64 in format string.
Signed-off-by Wei Liu <[email protected]>
and Reviewed-by too if you want that.
Quoted 20 lines
--- xen/arch/x86/boot/mkelf32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)xen/arch/x86/boot/mkelf32.c +1
-1@@ -356,7 +356,7 @@ int main(int argc, char **argv)if ( in64_phdr.p_offset > dat_siz || offset > in64_phdr.p_offset ) {fprintf (stderr,"Expected .note section within .text section!\n" \ -"Offset %ld not within %d!\n" , +"Offset %" PRId64" not within %d!\n" , in64_phdr.p_offset, dat_siz);return 1 ; }Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 7 lines · Konrad Rzeszutek Wilk
Quoted 6 lines · Wei Liu
When cross-compiling xen on a 32 bit build host:
boot/mkelf32.c: In function 'main':boot/mkelf32.c:360:21: error: format '%ld' expects argument of type 'long int', but argument 3 has type 'Elf64_Off' [-Werror=format]
cc1: all warnings being treated as errors
Quoted 7 lines
Quoted 3 lines
Fix that by using PRId64 in format string.
Signed-off-by Wei Liu <[email protected]>and Reviewed-by too if you want that.
(Feel a bit silly to do this to my own patch)
Please push it when convenient.
Quoted 4 lines
Quoted 4 lines
--- xen/arch/x86/boot/mkelf32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 16 lines
Quoted 16 lines
xen/arch/x86/boot/mkelf32.c +1
-1@@ -356,7 +356,7 @@ int main(int argc, char **argv)if ( in64_phdr.p_offset > dat_siz || offset > in64_phdr.p_offset ) {fprintf (stderr,"Expected .note section within .text section!\n" \ -"Offset %ld not within %d!\n" , +"Offset %" PRId64" not within %d!\n" , in64_phdr.p_offset, dat_siz);return 1 ; }Signature · 1 line
2.1.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel