linux-alpha.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] alpha: hack objstrip.c to make it compile.
@ 2010-03-30  1:49 Matt Turner
  2010-03-30 14:28 ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Turner @ 2010-03-30  1:49 UTC (permalink / raw)
  To: linux-alpha, linux-kernel
  Cc: Richard Henderson, Ivan Kokshaysky, ang, 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(-)

diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c
index 367d53d..54fa1ef 100644
--- a/arch/alpha/boot/tools/objstrip.c
+++ b/arch/alpha/boot/tools/objstrip.c
@@ -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: */
-- 
1.6.4.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFC] alpha: hack objstrip.c to make it compile.
  2010-03-30  1:49 [RFC] alpha: hack objstrip.c to make it compile Matt Turner
@ 2010-03-30 14:28 ` Richard Henderson
  2010-03-30 14:49   ` Matt Turner
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Henderson @ 2010-03-30 14:28 UTC (permalink / raw)
  To: Matt Turner; +Cc: linux-alpha, linux-kernel, Ivan Kokshaysky, ang

On 03/29/2010 06:49 PM, Matt Turner wrote:
> 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(-)
> 
> diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c
> index 367d53d..54fa1ef 100644
> --- a/arch/alpha/boot/tools/objstrip.c
> +++ b/arch/alpha/boot/tools/objstrip.c
> @@ -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~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] alpha: hack objstrip.c to make it compile.
  2010-03-30 14:28 ` Richard Henderson
@ 2010-03-30 14:49   ` Matt Turner
  2010-03-30 14:59     ` Richard Henderson
  0 siblings, 1 reply; 4+ messages in thread
From: Matt Turner @ 2010-03-30 14:49 UTC (permalink / raw)
  To: Richard Henderson; +Cc: linux-alpha, linux-kernel, Ivan Kokshaysky, ang

On Tue, Mar 30, 2010 at 10:28 AM, Richard Henderson <rth@twiddle.net> wrote:
> On 03/29/2010 06:49 PM, Matt Turner wrote:
>> 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(-)
>>
>> diff --git a/arch/alpha/boot/tools/objstrip.c b/arch/alpha/boot/tools/objstrip.c
>> index 367d53d..54fa1ef 100644
>> --- a/arch/alpha/boot/tools/objstrip.c
>> +++ b/arch/alpha/boot/tools/objstrip.c
>> @@ -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~

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 majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFC] alpha: hack objstrip.c to make it compile.
  2010-03-30 14:49   ` Matt Turner
@ 2010-03-30 14:59     ` Richard Henderson
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2010-03-30 14:59 UTC (permalink / raw)
  To: Matt Turner; +Cc: linux-alpha, linux-kernel, Ivan Kokshaysky, ang

On 03/30/2010 07:49 AM, Matt Turner wrote:
> 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~

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-30 14:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30  1:49 [RFC] alpha: hack objstrip.c to make it compile Matt Turner
2010-03-30 14:28 ` Richard Henderson
2010-03-30 14:49   ` Matt Turner
2010-03-30 14:59     ` Richard Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).