Bug 19108 - recompiling kernel made more difficult
recompiling kernel made more difficult
Product: Red Hat Linux
Classification: Retired
Component: kernel (Show other bugs)
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Michael K. Johnson
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2000-10-14 12:52 EDT by Michal Jaegermann
Modified: 2007-04-18 12:29 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-10-14 12:52:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Michal Jaegermann 2000-10-14 12:52:34 EDT
An attempt to recompile a non-Red Hat supplied kernel ends up with

gcc tools/objstrip.c -o tools/objstrip
tools/objstrip.c: In function `main':
tools/objstrip.c:153: invalid type argument of `->'
make[1]: *** [tools/objstrip] Error 1
make[1]: Leaving directory `/usr/src/linux-2.2.18px/arch/alpha/boot'
make: *** [boot] Error 2

In fact creating this executable is mostly irrelevant but "general
users" will be quite spooked.

A reason for this failure is an apparently gratituous change in
/usr/include/linux/asm/elf.h which looks like this:

--- include/asm/elf.h	Wed Jun 24 15:30:11 1998
+++ /usr/include/asm/elf.h	Tue Jul 11 16:43:45 2000
@@ -22,7 +22,7 @@
  * This is used to ensure we don't load something for the wrong
-#define elf_check_arch(x) ((x) == EM_ALPHA)
+#define elf_check_arch(x) ((x)->e_machine == EM_ALPHA)
  * These are used to set parameters in the core dumps.
@@ -127,8 +127,7 @@
 #ifdef __KERNEL__
 #define SET_PERSONALITY(EX, IBCS2)				\
-	current->personality =					\
-	  ((EX).e_flags & EF_ALPHA_32BIT			\
+	set_personality((EX).e_flags & EF_ALPHA_32BIT		\
and more precisely and more precisely a change to 'elf_check_arch' macro.

True, arch/alpha/boot/Makefile from Red Hat sources is doctored to
   gcc -I../../../include tools/objstrip.c -o tools/objstrip
and this will pick up a correct definition, but in standard kernel
sources one ends up running
   gcc tools/objstrip.c -o tools/objstrip
which pick up a wrong macro and fails like above.

It is quite likely that other tools for Alpha which need that header
will end up with similar troubles.  Why this modification?

Comment 1 Phil Copeland 2001-05-06 00:58:08 EDT
I'm assuming this is no longer a problem?

Comment 2 Michal Jaegermann 2001-05-06 02:22:33 EDT
Indeed I did not notice anything of that sort in recent times.

Note You need to log in before you can comment on or make changes to this bug.