From ba42e1409ece2e9d56728e0ee6a6342c05ec6e52 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Tue, 29 May 2012 14:08:11 -0700 Subject: relocs: Move stop to the end The Linux kernel puts the stop word at the beginning of the relocation list (the list is processed backwards); Syslinux puts the stop word at the beginning of the relocation list (the list is processed forwards.) Missed that change when syncing with the kernel version. Signed-off-by: H. Peter Anvin --- com32/tools/relocs.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/com32/tools/relocs.c b/com32/tools/relocs.c index f06af6e4..86fc7c50 100644 --- a/com32/tools/relocs.c +++ b/com32/tools/relocs.c @@ -1,3 +1,6 @@ +/* + * This file is taken from the Linux kernel and is distributed under GPL v2. + */ #include #include #include @@ -40,9 +43,7 @@ enum symtype { static const char * const sym_regex_kernel[S_NSYMTYPES] = { /* - * Following symbols have been audited. There values are constant and do - * not change if bzImage is loaded at a different physical address than - * the address for which it has been compiled. Don't warn user about + * Following symbols have been audited. Don't warn user about * absolute relocations present w.r.t these symbols. */ [S_ABS] = @@ -705,11 +706,11 @@ static void emit_relocs(int as_text, int use_real_mode) printf("\t.long 0x%08lx\n", relocs[i]); } } else { - /* Print a stop */ - printf("\t.long 0x%08lx\n", (unsigned long)0); for (i = 0; i < reloc_count; i++) { printf("\t.long 0x%08lx\n", relocs[i]); } + /* Print a stop */ + printf("\t.long 0x%08lx\n", (unsigned long)0); } printf("\n"); @@ -725,13 +726,13 @@ static void emit_relocs(int as_text, int use_real_mode) for (i = 0; i < reloc_count; i++) write32(relocs[i], stdout); } else { - /* Print a stop */ - write32(0, stdout); - /* Now print each relocation */ for (i = 0; i < reloc_count; i++) { write32(relocs[i], stdout); } + + /* Print a stop */ + write32(0, stdout); } } } -- cgit v1.2.1