aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2012-05-29 14:08:11 -0700
committerH. Peter Anvin <hpa@linux.intel.com>2012-05-29 14:11:42 -0700
commitba42e1409ece2e9d56728e0ee6a6342c05ec6e52 (patch)
tree18935cdc3b3ba4f7fa8a24598d2e1ba3ac5b9776
parent2c2c75abc360c4803902f3effa84a28746e34fde (diff)
downloadsyslinux-ba42e1409ece2e9d56728e0ee6a6342c05ec6e52.tar.gz
syslinux-ba42e1409ece2e9d56728e0ee6a6342c05ec6e52.tar.xz
syslinux-ba42e1409ece2e9d56728e0ee6a6342c05ec6e52.zip
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 <hpa@linux.intel.com>
-rw-r--r--com32/tools/relocs.c17
1 files 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 <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
@@ -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);
}
}
}