Commit graph

23 commits

Author SHA1 Message Date
Peter Jones
413f1e13e6 .mod files: Strip annobin annotations and .eh_frame, and their relocations
This way debuginfo built from the .module will still include this
information, but the final result won't have the data we don't actually
need in the modules, either on-disk, loaded at runtime, or in prebuilt
images.

Signed-off-by: Peter Jones <pjones@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2018-03-05 14:08:22 +01:00
Vladimir Serbinenko
a827807a13 Fix shebang for termux.
Termux doesn't have a /bin/sh. So we needto use $SHELL.
Keep /bin/sh as much as possible.
2017-05-03 12:49:31 +02:00
Vladimir Serbinenko
6371e9c104 grub-module-verifier: Ignore all_video emptiness on xen.
It's intentional that it's empty when no video modules
are available.
2017-01-30 00:13:41 +00:00
Andrei Borzenkov
ba83ed1538 Add missing BUILD_EXEEXT 2016-01-01 12:06:40 +03:00
Andrey Borzenkov
4d6e9c8a92 remove temporary .bin files (kernel and modules) 2015-12-31 23:00:25 +03:00
Vladimir Serbinenko
3b21499506 Disable build-time module check on emu.
On emu some checks can be laxer like check for relocation range. Additionally
module loading in emu is rarely used. So skip this check rather than making
it laxer for all platforms. In ideal we may want to have slightly different
check for emu but for now this is good enough.
2015-12-31 18:20:11 +01:00
Vladimir Serbinenko
68e158dffd Strip .ARM.exidx
This section is generated by clang and is useful only for debugging.
It contains exotic relocations, so strip them to avoid them interferring
with module loading.
2015-12-31 18:13:59 +01:00
Vladimir Serbinenko
a7cf8b1e23 Verify modules on build-time rather than failing in runtime. 2015-12-31 13:09:15 +01:00
Vladimir Serbinenko
23d2abc33c * grub-core/genmod.sh.in: Strip before converting to ELF as strip
may not work with ELF.
2013-12-16 13:18:48 +01:00
Vladimir Serbinenko
a9f25a0819 * configure.ac: Probe for linking format rather than guessing it based
on target_os.
2013-11-14 23:17:18 +01:00
Vladimir 'phcoder' Serbinenko
affce7d417 * grub-core/genmod.sh.in: Remove ./ from TARGET_OBJ2ELF. Add quotes.
Based on patches from AROS.
2013-09-23 13:03:03 +02:00
Vladimir 'phcoder' Serbinenko
fc97214f7e * INSTALL: Document cross-compilation.
* acinclude.m4: Determine whether nm support -P and --defined-only.
	* configure.ac: Add TARGET_ to all variables pertaining to target
	that don't have it yet.
	* gentpl.py: Likewise.
	* grub-core/Makefile.am: Likewise.
	* grub-core/genmod.sh.in: Likewise.
	* grub-core/gensyminfo.sh.in: Handle OpenBSD and other non-GNU nm
	as well.
2013-08-22 01:56:28 +02:00
Vladimir 'phcoder' Serbinenko
7284143a54 * grub-core/genmod.sh.in: Enable objconv errors 2030, 2050 and 2031
as they are fatal.
2012-06-05 17:20:39 +02:00
Vladimir 'phcoder' Serbinenko
85a730ca9f * grub-core/genmod.sh.in: Fix a bug in Apple part which caused
dependency discard.
2012-05-28 17:32:24 +02:00
Vladimir 'phcoder' Serbinenko
0f021838c4 * Makefile.am: Strip gold section.
* conf/Makefile.common: Likewise.
	* gentpl.py: Likewise.
	* grub-core/Makefile.core.def: Likewise.
	* grub-core/genmod.sh.in: Likewise.
2012-03-10 16:55:48 +01:00
Vladimir 'phcoder' Serbinenko
31a12124a0 * grub-core/genmod.sh.in: Rewrite the Apple part. 2012-02-29 16:00:27 +01:00
Vladimir 'phcoder' Serbinenko
e7d2a906b0 * grub-core/genmod.sh.in: Add -R .note.GNU-stack to strip. 2012-02-26 22:57:26 +01:00
Colin Watson
5626056ffb * grub-core/genmod.sh.in: Use 'set -e' rather than '#! /bin/sh -e',
to avoid accidents when debugging with 'sh -x'.
* grub-core/gensyminfo.sh.in: Likewise.
* tests/example_scripted_test.in: Likewise.
* tests/grub_cmd_regexp.in: Likewise.
* tests/grub_script_blanklines.in: Likewise.
* tests/grub_script_dollar.in: Likewise.
* tests/grub_script_expansion.in: Likewise.
* tests/grub_script_final_semicolon.in: Likewise.
* tests/partmap_test.in: Likewise.
* tests/util/grub-shell-tester.in: Likewise.
* tests/util/grub-shell.in: Likewise.
2011-05-18 12:53:07 +01:00
Vladimir 'phcoder' Serbinenko
f1632d4dd0 Fix compilation on cygwin.
* conf/Makefile.common (STRIPFLAGS_KERNEL): Add -F elf32-i386 and
	-R .drectve on cygwin.
	* conf/i386-pc-cygwin-img-ld.sc: Merge rdata and pdata into data.
	* configure.ac: Use $(top_builddir) in TARGET_OBJ2ELF.
	(COND_CYGWIN): New condition.
	* grub-core/Makefile.am (%.mod): Set TARGET_OBJ2ELF.
	* grub-core/genmod.sh.in: Use ${TARGET_OBJ2ELF} and
	not @TARGET_OBJ2ELF@.
	* util/grub-pe2elf.c (write_symbol_table): Use pe_symtab->type and not
	type to determine whether aux is to be used.
2011-01-13 22:23:49 +01:00
Shea Levy
022d01b807 * grub-core/genmod.sh.in: Use @OBJCOPY@ rather than objcopy. 2010-12-25 18:21:46 +01:00
Grégoire Sutre
b65ea15514 Make mktemp invocations portable. 2010-10-18 22:50:01 +02:00
BVK Chaitanya
3572f2b65a Reduce number of temporary files generated by build system.
* grub-core/gencmdlist.sh: Removed.
	* grub-core/genfslist.sh: Removed.
	* grub-core/genhandlerlist.sh: Removed.
	* grub-core/genmodsrc.sh: Removed.
	* grub-core/genpartmaplist.sh: Removed.
	* grub-core/genparttoollist.sh: Removed.
	* grub-core/gentermiinallist.sh: Removed.
	* grub-core/genvideolist.sh: Removed.

	* grub-core/genmod.sh.in: New file.
	* grub-core/gensyminfo.sh.in: New file.

	* conf/Makefile.common (CPPFLAGS_*_LIST): New marker flags.
	* conf/Makefile.extra-dist: Update with new files.
	* gentpl.py: Remove rules related to unnecessary temporary files.
	* grub-core/Makefile.am (syminfo.lst): New replacement for def-*
	and und-* files.
	* grub-core/Makefile.core.def: New rules for gensyminfo.sh and
	genmod.sh scripts.
	* grub-core/bus/usb/uhci.c: Remove empty #define.
	* grub-core/genmoddep.awk: Updated with new syminfo format.
	* util/bash-completion.d/Makefile.am: Add config.log to
	CLEANFILES.
2010-09-19 19:29:36 +05:30
BVK Chaitanya
6b5f780f05 use objcopy instead of creating mod-*.c and mod-*.o 2010-08-29 16:43:07 +05:30