[syslinux:master] relocs: Move stop to the end
syslinux-bot for H. Peter Anvin
hpa at linux.intel.com
Tue May 29 14:15:02 PDT 2012
Commit-ID: ba42e1409ece2e9d56728e0ee6a6342c05ec6e52
Gitweb: http://www.syslinux.org/commit/ba42e1409ece2e9d56728e0ee6a6342c05ec6e52
Author: H. Peter Anvin <hpa at linux.intel.com>
AuthorDate: Tue, 29 May 2012 14:08:11 -0700
Committer: H. Peter Anvin <hpa at linux.intel.com>
CommitDate: Tue, 29 May 2012 14:11:42 -0700
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 at linux.intel.com>
---
com32/tools/relocs.c | 17 +++++++++--------
1 files changed, 9 insertions(+), 8 deletions(-)
diff --git a/com32/tools/relocs.c b/com32/tools/relocs.c
index f06af6e..86fc7c5 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);
}
}
}
More information about the Syslinux-commits
mailing list