diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 16:40:53 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-22 16:40:53 (GMT) |
commit | 02c502566ef505d0469fa27567f48766c1f5f7af (patch) | |
tree | dd29678eb5f15ddfe537418eb83ad2c54074c37b /arch/x86/boot/compressed/relocs.c | |
parent | f06fc0c0de0b4f01dbad8ec5552e78192c7abbb8 (diff) | |
parent | a51f4047758d2bcd099ea113b833ed380f4024ba (diff) | |
download | linux-fsl-qoriq-02c502566ef505d0469fa27567f48766c1f5f7af.tar.xz |
Merge branch 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86/build changes from Ingo Molnar.
* 'x86-build-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
x86, build: Fix portability issues when cross-building
x86, tools: Remove unneeded header files from tools/build.c
USB: ffs-test: Don't duplicate {get,put}_unaligned*() functions
x86, efi: Fix endian issues and unaligned accesses
x86, boot: Restrict CFLAGS for hostprogs
x86, mkpiggy: Don't open code put_unaligned_le32()
x86, relocs: Don't open code put_unaligned_le32()
tools/include: Add byteshift headers for endian access
Diffstat (limited to 'arch/x86/boot/compressed/relocs.c')
-rw-r--r-- | arch/x86/boot/compressed/relocs.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/x86/boot/compressed/relocs.c b/arch/x86/boot/compressed/relocs.c index 89bbf4e..d3c0b02 100644 --- a/arch/x86/boot/compressed/relocs.c +++ b/arch/x86/boot/compressed/relocs.c @@ -10,6 +10,7 @@ #define USE_BSD #include <endian.h> #include <regex.h> +#include <tools/le_byteshift.h> static void die(char *fmt, ...); @@ -605,10 +606,7 @@ static void emit_relocs(int as_text) fwrite("\0\0\0\0", 4, 1, stdout); /* Now print each relocation */ for (i = 0; i < reloc_count; i++) { - buf[0] = (relocs[i] >> 0) & 0xff; - buf[1] = (relocs[i] >> 8) & 0xff; - buf[2] = (relocs[i] >> 16) & 0xff; - buf[3] = (relocs[i] >> 24) & 0xff; + put_unaligned_le32(relocs[i], buf); fwrite(buf, 4, 1, stdout); } } |