alpha: hack objstrip.c to make it compile.
Matt Turner
maintainerRFC 1/1 alpha: hack objstrip.c to make it compile.
I don't think this is the appropriate fix. What should I do to fix this?
--- arch/alpha/boot/tools/objstrip.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
arch/alpha/boot/tools/objstrip.c +3 -0
@@ -27,6 +27,9 @@#include <linux/param.h> #ifdef __ELF__# include <linux/elf.h> +# define elfhdr elf64_hdr +# define elf_phdr elf64_phdr +# define elf_check_arch (x) ((x)->e_machine == EM_ALPHA)#endif /* bootfile size must be multiple of BLOCK_SIZE: */
Signature · 1 line
1.6.4.4
Quoted 10 lines · Matt Turner
I don't think this is the appropriate fix. What should I do to fix this?
--- arch/alpha/boot/tools/objstrip.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)arch/alpha/boot/tools/objstrip.c +0
-0
arch/alpha/boot/tools/objstrip.c line 34
Quoted 8 lines
arch/alpha/boot/tools/objstrip.c +3
-0@@ -27,6 +27,9 @@#include <linux/param.h> #ifdef __ELF__# include <linux/elf.h> +# define elfhdr elf64_hdr +# define elf_phdr elf64_phdr +# define elf_check_arch (x) ((x)->e_machine == EM_ALPHA)#endif
Hum. Is it so bad to just #define __KERNEL__ here before that one include? Similar games are played in tools/perf/, and with a suitible comment I think that should be all right.
r~
Matt Turner
maintainerQuoted 25 lines · Richard Henderson
Quoted 10 lines · Matt Turner
I don't think this is the appropriate fix. What should I do to fix this?
---
arch/alpha/boot/tools/objstrip.c | 3 +++1 files changed, 3 insertions(+), 0 deletions(-)arch/alpha/boot/tools/objstrip.c +0
-0arch/alpha/boot/tools/objstrip.c line 34
Quoted 8 lines
arch/alpha/boot/tools/objstrip.c +3
-0@@ -27,6 +27,9 @@ #include <linux/param.h> #ifdef __ELF__ # include <linux/elf.h> +# define elfhdr elf64_hdr +# define elf_phdr elf64_phdr +# define elf_check_arch (x) ((x)->e_machine == EM_ALPHA) #endifHum. Is it so bad to just #define
__KERNEL__here before that one include? Similar games are played intools/perf/, and with a suitible comment I think that should be all right.
Quoted 1 line
r~
The problem is that, at least with my distribution, probably others too, the headers installed into /usr/include/linux/ are stripped of anything inside #ifdef __KERNEL__.
Matt
--
To unsubscribe from this list: send the line "unsubscribe linux-alpha" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 3 lines · Matt Turner
The problem is that, at least with my distribution, probably others too, the headers installed into
/usr/include/linux/are stripped of anything inside #ifdef__KERNEL__.
I thought this was built with kernel header files? It used to be.
If it's built with system header files now, you might as well convert the thing to use <elf.h> instead. Which shouldn't be too much different from what you've done already. Although I wouldn't bother with the #defines... just propagate the name changes into the source proper.
r~