kbuild, modpost: fix unexpected non-allocatable section when cross compiling
commit7d875a02864a35532543897195dfea2235815df8
authorAnders Kaseorg <andersk@MIT.EDU>
Sun, 3 May 2009 20:02:55 +0000 (3 22:02 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 4 May 2009 11:05:03 +0000 (4 13:05 +0200)
tree77949e1c62598f76b0921e593c81837d936869ed
parentb4348f32dae3cb6eb4bc21c7ed8f76c0b11e9d6a
kbuild, modpost: fix unexpected non-allocatable section when cross compiling

The missing TO_NATIVE(sechdrs[i].sh_flags) was causing many
unexpected non-allocatable section warnings when cross-compiling
for an architecture with a different endianness.

Fix endianness of all the fields in the ELF header and
section headers, not just some of them so we are not
hit by this anohter time.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reported-by: Sean MacLennan <smaclennan@pikatech.com>
Tested-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
scripts/mod/modpost.c