Bug 19108 - recompiling kernel made more difficult
Summary: recompiling kernel made more difficult
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.3
Hardware: alpha
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-14 16:52 UTC by Michal Jaegermann
Modified: 2007-04-18 16:29 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2000-10-14 16:52:39 UTC
Embargoed:


Attachments (Terms of Use)

Description Michal Jaegermann 2000-10-14 16:52:34 UTC
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
architecture.
  */
-#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		\
 	   ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX)
 #endif
 
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
run
   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?

  Michal
  michal

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

Phil
=--=

Comment 2 Michal Jaegermann 2001-05-06 06:22:33 UTC
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.