linux-kernel-test/scripts/mod
Anders Kaseorg b614a697dc kbuild, modpost: Check the section flags, to catch missing "ax"/"aw"
When you put
  .section ".foo"
in an assembly file instead of
  .section "foo", "ax"
, one of the possible symptoms is that modpost will see an
ld-generated section name ".foo.1" in section_rel() or section_rela().
But this heuristic has two problems: it will miss a bad section that
has no relocations, and it will incorrectly flag many gcc-generated
sections as bad when compiling with -ffunction-sections
-fdata-sections.

On mips it fixes a lot of bogus warnings with gcc 4.4.0 lije this one:
WARNING: crypto/cryptd.o (.text.T.349): unexpected section name.

So instead of checking whether the section name matches a particular
pattern, we directly check for a missing SHF_ALLOC in the section
flags.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2009-05-01 10:54:05 +02:00
..
.gitignore Add some basic .gitignore files 2005-10-18 08:26:15 -07:00
empty.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file2alias.c platform: introduce module id table for platform devices 2009-03-24 16:38:24 -07:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mk_elfconfig.c remove the v850 port 2008-07-24 10:47:24 -07:00
modpost.c kbuild, modpost: Check the section flags, to catch missing "ax"/"aw" 2009-05-01 10:54:05 +02:00
modpost.h kbuild: soften modpost checks when doing cross builds 2008-03-23 21:38:54 +01:00
sumversion.c kbuild: prevent modpost from looking for a .cmd file for a static library linked into a module 2008-10-29 22:02:10 +01:00