20 Mar, 2013
1 commit
-
Pass symbol-prefix to genksyms instead of arch, so that the decision
what symbol prefix to use is kept in one place.Basically genksyms used to take a -a $ARCH argument and it used that to
determine whether to add an underscore symbol prefix. It's now changed
to take a -s $SYMBOL_PREFIX argument so that the caller decides whether
a symbol prefix is required. The build system then uses
CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX to determine whether to pass the
argument.Signed-off-by: James Hogan
Signed-off-by: Rusty Russell
03 Mar, 2013
1 commit
-
Meta uses symbol prefixes, so add "metag" to the list of architectures
to set the mod_prefix to "_" for. This fixes __crc_* symbols to add the
extra underscore to match _CRC_SYMBOL macro in and so
that modpost finds them.Signed-off-by: James Hogan
08 Jan, 2012
1 commit
-
Add "keywords.hash.c", "lex.lex.c", "parse.tab.c" and "parse.tab.h" to
clean-list so that they get automagically deleted at clean/mrproper
time.Signed-off-by: Fernando Luis Vazquez Cao
Signed-off-by: Michal Marek
11 Oct, 2011
3 commits
-
Consider structures, unions and enums defined in the source file as
internal and do not expand them. This way, changes to e.g. struct
serial_private in drivers/tty/serial/8250_pci.c will not affect the
checksum of the pciserial_* exports. -
Move the identical logic for recording a struct/union/enum definition to
a function.
25 Jul, 2011
1 commit
-
The ARRAY_SIZE macro in scripts/genksyms/genksyms.c returns a value of
type size_t. That value is being compared to a variable of type int in
a loop in read_node(). Change the int variable to size_t type as well,
so we don't do signed vs unsigned type comparisons with all the
potential promotion/sign extension trouble that can cause (also
silences compiler warnings at high levels of warnings).Signed-off-by: Jesper Juhl
Signed-off-by: Michal Marek
10 Jun, 2011
4 commits
-
Signed-off-by: Arnaud Lacombe
-
Signed-off-by: Arnaud Lacombe
-
Signed-off-by: Arnaud Lacombe
-
Renaming hash and lookup functions on the command line would reduces its
genericity. Use the .gperf file to pass this information. Do the same for the
target language.Signed-off-by: Arnaud Lacombe
17 Mar, 2011
7 commits
-
Regenerated the parser after "genksyms: Track changes to enum
constants".Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg -
Enum constants can be used as array sizes; if the enum itself does not
appear in the symbol expansion, a change in the enum constant will go
unnoticed. Example patch that changes the ABI but does not change the
checksum with current genksyms:| enum e {
| E1,
| E2,
|+ E3,
| E_MAX
| };
|
| struct s {
| int a[E_MAX];
| }
|
| int f(struct s *s) { ... }
| EXPORT_SYMBOL(f)Therefore, remember the value of each enum constant and
expand each occurence to . The value is not actually
computed, but instead an expression in the form
(last explicitly assigned value) + N
is used. This avoids having to parse and semantically understand whole
of C.Note: The changes won't take effect until the lexer and parser are
rebuilt by the next patch.Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg -
Allow searching for symbols of an exact type. The lexer does this and a
subsequent patch will add one more usage.Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg -
Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg -
Instead of special-casing SYM_NORMAL, do not map any name to it. Also
explicitly set the single-letter name of the symbol type, which will be
needed by a further patch. The only user-visible change is one debug
printf.Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg -
The V2_TOKENS state is active all the time.
Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg -
The header is already #included, no need to include it a second time.
lex.c_shipped was regenerated using flex-2.5.35.Signed-off-by: Michal Marek
Acked-by: Sam Ravnborg
25 Nov, 2010
1 commit
-
FreeBSD does not like when __STDC__ is defined, use the standard
instead.Signed-off-by: Arnaud Lacombe
Signed-off-by: Michal Marek
02 Feb, 2010
1 commit
-
It is the last place when the file is read, so close it.
Signed-off-by: Alexander Beregalov
Signed-off-by: Michal Marek
12 Dec, 2009
1 commit
-
Despite being unused these should also get a CRC calculated.
Primarily I view this as a consistency thing. But I also think this is
one of the reasons why __crc_* need to be weak (which I think should be
avoided, and hence we should have the goal to eliminate this so that
failure to calculate a proper CRC for a symbol causes the build to fail).Signed-off-by: Jan Beulich
Cc: Anibal Monsalve Salazar
Cc: Steven Rostedt
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Michal Marek
16 Nov, 2009
1 commit
-
The genksyms keyword gperf hash provides a function is_reserved_word.
genksyms #includes the resulting generated file keywords.c, so the
function gets used only in the same source file that defines it. Mark
is_reserved_word static, and regenerate the corresponding generated
file.Signed-off-by: Josh Triplett
23 Sep, 2009
1 commit
-
Fix up -Wmissing-prototypes in compileable userspace code, mainly under
Documentation/.Signed-off-by: Ladinu Chandrasinghe
Signed-off-by: Trevor Keith
Cc: Sam Ravnborg
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Jan, 2009
1 commit
-
This reverts commit ad7a953c522ceb496611d127e51e278bfe0ff483.
And commit: ("allow stripping of generated symbols under CONFIG_KALLSYMS_ALL")
9bb482476c6c9d1ae033306440c51ceac93ea80cThese stripping patches has caused a set of issues:
1) People have reported compatibility issues with binutils due to
lack of support for `--strip-unneeded-symbols' with objcopy 2.15.92.0.2
Reported by: Wenji
2) ccache and distcc no longer works as expeced
Reported by: Ted, Roland, + others
3) The installed modules increased a lot in size
Reported by: Ted, Davej + othersReported-by: Wenji Huang
Reported-by: "Theodore Ts'o"
Reported-by: Dave Jones
Reported-by: Roland McGrath
Signed-off-by: Sam Ravnborg
20 Dec, 2008
2 commits
-
Building upon parts of the module stripping patch, this patch
introduces similar stripping for vmlinux when CONFIG_KALLSYMS_ALL=y.
Using CONFIG_KALLSYMS_STRIP_GENERATED reduces the overhead of
CONFIG_KALLSYMS_ALL from 245k/310k to 65k/80k for the (i386/x86-64)
kernels I tested with.The patch also does away with the need to special case the kallsyms-
internal symbols by making them available even in the first linking
stage.While it is a generated file, the patch includes the changes to
scripts/genksyms/keywords.c_shipped, as I'm unsure what the procedure
here is.Signed-off-by: Jan Beulich
Signed-off-by: Sam Ravnborg -
This patch changes the way __crc_ symbols are being resolved from
using ld to do so to using the assembler, thus allowing these symbols
to be marked local (the linker creates then as global ones) and hence
allow stripping (for modules) or ignoring (for vmlinux) them. While at
this, also strip other generated symbols during module installation.One potentially debatable point is the handling of the flags passeed
to gcc when translating the intermediate assembly file into an object:
passing $(c_flags) unchanged doesn't work as gcc passes --gdwarf2 to
gas whenever is sees any -g* option, even for -g0, and despite the
fact that the compiler would have already produced all necessary debug
info in the C->assembly translation phase. I took the approach of just
filtering out all -g* options, but an alternative to such negative
filtering might be to have a positive filter which might, in the ideal
case allow just all the -Wa,* options to pass through.Signed-off-by: Jan Beulich
Signed-off-by: Sam Ravnborg
04 Dec, 2008
2 commits
-
This adds an "override" keyword for use in *.symvers / *.symref files.
When a symbol is overridden, the symbol's old definition will be used for
computing checksums instead of the new one, preserving the previous
checksum. (Genksyms will still warn about the change.)This is meant to allow distributions to hide minor actual as well as fake
ABI changes. (For example, when extra type information becomes available
because additional headers are included, this may change checksums even
though none of the types used have actully changed.)This approach also allows to get rid of "#ifdef __GENKSYMS__" hacks in the
code, which are currently used in some vendor kernels to work around
checksum changes.Signed-off-by: Andreas Gruenbacher
Cc: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Sam Ravnborg -
Sometimes it is preferable to avoid changes of exported symbol checksums
(to avoid breaking externally provided modules). When a checksum change
occurs, it can be hard to figure out what caused this change: underlying
types may have changed, or additional type information may simply have
become available at the point where a symbol is exported.Add a new --reference option to genksyms which allows it to report why
checksums change, based on the type information dumps it creates with the
--dump-types flag. Genksyms will read in such a dump from a previous run,
and report which symbols have changed (and why).The behavior can be controlled for an entire build as follows: If
KBUILD_SYMTYPES is set, genksyms uses --dump-types to produce *.symtypes
dump files. If any *.symref files exist, those will be used as the
reference to check against. If KBUILD_PRESERVE is set, checksum changes
will fail the build.Signed-off-by: Andreas Gruenbacher
Cc: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Sam Ravnborg
01 Aug, 2008
2 commits
-
The extern flag currently is not included in type dump files
(genksyms --dump-types). Include that flag there for completeness.Signed-off-by: Andreas Gruenbacher
Signed-off-by: Sam Ravnborg -
We are having two kinds of problems with genksyms today: fake checksum
changes without actual ABI changes, and changes which we would rather like
to ignore (such as an additional field at the end of a structure that
modules are not supposed to touch, for example).I have thought about ways to improve genksyms and compute checksums
differently to avoid those problems, but in the end I don't see a
fundamentally better way. So here are some genksyms patches for at least
making the checksums more easily manageable, if we cannot fully fix them.In addition to the bugfixes (the first two patches), this allows genksyms
to track checksum changes and report why a checksum changed (third patch),
and to selectively ignore changes (fourth patch).This patch:
Gcc __attribute__ definitions may occur repeatedly, e.g.,
static int foo __attribute__((__used__))
__attribute__((aligned (16)));The genksyms parser does not understand this, and generates a syntax error.
Fix this case.Signed-off-by: Andreas Gruenbacher
Cc: Randy Dunlap
Signed-off-by: Andrew Morton
Signed-off-by: Sam Ravnborg
31 Jul, 2008
1 commit
-
gcc 4.3 correctly determines that input() is unused and gives the
following warning:...
HOSTCC scripts/genksyms/lex.o
scripts/genksyms/lex.c:1487: warning: ‘input’ defined but not used
...Fix it by adding %option noinput to scripts/genksyms/lex.l and
regeneration of scripts/genksyms/lex.c_shipped.Signed-off-by: Adrian Bunk
Signed-off-by: Sam Ravnborg
25 Jul, 2008
1 commit
-
Trying to compile the v850 port brings many compile errors, one of them exists
since at least kernel 2.6.19.There also seems to be noone willing to bring this port back into a usable
state.This patch therefore removes the v850 port.
If anyone ever decides to revive the v850 port the code will still be
available from older kernels, and it wouldn't be impossible for the port to
reenter the kernel if it would become actively maintained again.Signed-off-by: Adrian Bunk
Acked-by: Greg Ungerer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Jan, 2008
1 commit
-
The usage does not mention the "-a,--arch" or "-T,--dump-types" options, so
add them. The calls to getopt() seem to mention options that no longer exist
(some "k" and "p" thingy) but omits the "h" option which means using '-h'
actually triggers the error code path, so update those as well.Signed-off-by: Mike Frysinger
Signed-off-by: Sam Ravnborg
13 Oct, 2007
3 commits
-
This patch updates the _shipped files for genksyms.
See previous patch for actual functional changes.Signed-off-by: Sam Ravnborg
-
Recently the __extension__ keyword has been introduced in the kernel.
Teach genksyms about this keyword so it can generate correct CRC for
exported symbols that uses a symbol marked __extension__.
For now only the typedef variant:__extension__ typedef ...
is supported.
Later we may add more variants as needed.This patch contains the actual source file changes. The
following patch will hold modifications to the generated
files (*_shipped) and only after the second patch the fix
has effect.Signed-off-by: Sam Ravnborg
-
When enabling GENERATE_PARSER the genksyms Makefile
failed to create _shipped version of generated files.Modifying keywords.gperf failed to cause a rebuild
of genksyms.
Fixed by specifying keywowrds .c as explicit prerequisite
of the lexer.Signed-off-by: Sam Ravnborg
08 May, 2007
1 commit
-
This adds support for the Analog Devices Blackfin processor architecture, and
currently supports the BF533, BF532, BF531, BF537, BF536, BF534, and BF561
(Dual Core) devices, with a variety of development platforms including those
avaliable from Analog Devices (BF533-EZKit, BF533-STAMP, BF537-STAMP,
BF561-EZKIT), and Bluetechnix! Tinyboards.The Blackfin architecture was jointly developed by Intel and Analog Devices
Inc. (ADI) as the Micro Signal Architecture (MSA) core and introduced it in
December of 2000. Since then ADI has put this core into its Blackfin
processor family of devices. The Blackfin core has the advantages of a clean,
orthogonal,RISC-like microprocessor instruction set. It combines a dual-MAC
(Multiply/Accumulate), state-of-the-art signal processing engine and
single-instruction, multiple-data (SIMD) multimedia capabilities into a single
instruction-set architecture.The Blackfin architecture, including the instruction set, is described by the
ADSP-BF53x/BF56x Blackfin Processor Programming Reference
http://blackfin.uclinux.org/gf/download/frsrelease/29/2549/Blackfin_PRM.pdfThe Blackfin processor is already supported by major releases of gcc, and
there are binary and source rpms/tarballs for many architectures at:
http://blackfin.uclinux.org/gf/project/toolchain/frs There is complete
documentation, including "getting started" guides available at:
http://docs.blackfin.uclinux.org/ which provides links to the sources and
patches you will need in order to set up a cross-compiling environment for
bfin-linux-uclibcThis patch, as well as the other patches (toolchain, distribution,
uClibc) are actively supported by Analog Devices Inc, at:
http://blackfin.uclinux.org/We have tested this on LTP, and our test plan (including pass/fails) can
be found at:
http://docs.blackfin.uclinux.org/doku.php?id=testing_the_linux_kernel[m.kozlowski@tuxland.pl: balance parenthesis in blackfin header files]
Signed-off-by: Bryan Wu
Signed-off-by: Mariusz Kozlowski
Signed-off-by: Aubrey Li
Signed-off-by: Jie Zhang
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
25 Jun, 2006
2 commits
-
We have had no use of the coredump file for a long time.
So just exit(1) and avoid coredumping.Signed-off-by: Sam Ravnborg
-
Here is a patch that adds a new -T option to genksyms for generating dumps of
the type definition that makes up the symbol version hashes. This allows to
trace modversion changes back to what caused them. The dump format is the
name of the type defined, followed by its definition (which is almost C):s#list_head struct list_head { s#list_head * next , * prev ; }
The s#, u#, e#, and t# prefixes stand for struct, union, enum, and typedef.
The exported symbols do not define types, and thus do not have an x# prefix:nfs4_acl_get_whotype int nfs4_acl_get_whotype ( char * , t#u32 )
The symbol type defintion of a single file can be generated with:
make fs/jbd/journal.symtypes
If KBUILD_SYMTYPES is defined, all the *.symtypes of all object files that
export symbols are generated.The single *.symtypes files can be combined into a single file after a kernel
build with a script like the following:for f in $(find -name '*.symtypes' | sort); do
f=${f#./}
echo "/* ${f%.symtypes}.o */"
cat $f
echo
done \
| sed -e '\:UNKNOWN:d' \
-e 's:[,;] }:}:g' \
-e 's:\([[({]\) :\1:g' \
-e 's: \([])},;]\):\1:g' \
-e 's: $::' \
$f \
| awk '
/^.#/ { if (defined[$1] == $0) {
print $1
next
}
defined[$1] = $0
}
{ print }
'When the kernel ABI changes, diffing individual *.symtype files, or the
combined files, against each other will show which symbol changes caused the
ABI changes. This can save a tremendous amount of time.Dump the types that make up modversions
Signed-off-by: Andreas Gruenbacher
Signed-off-by: Sam Ravnborg
26 Mar, 2006
1 commit
-
* master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits)
kbuild: remove obsoleted scripts/reference_* files
kbuild: fix make help & make *pkg
kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h
Kconfig: remove the CONFIG_CC_ALIGN_* options
kbuild: add -fverbose-asm to i386 Makefile
kbuild: clean-up genksyms
kbuild: Lindent genksyms.c
kbuild: fix genksyms build error
kbuild: in makefile.txt note that Makefile is preferred name for kbuild files
kbuild: replace PHONY with FORCE
kbuild: Fix bug in crc symbol generating of kernel and modules
kbuild: change kbuild to not rely on incorrect GNU make behavior
kbuild: when warning symbols exported twice now tell user this is the problem
kbuild: fix make dir/file.xx when asm symlink is missing
kbuild: in the section mismatch check try harder to find symbols
kbuild: fix section mismatch check for unwind on IA64
kbuild: kill false positives from section mismatch warnings for powerpc
kbuild: kill trailing whitespace in modpost & friends
kbuild: small update of allnoconfig description
kbuild: make namespace.pl CROSS_COMPILE happy
...Trivial conflict in arch/ppc/boot/Makefile manually fixed up