Generating ELF notes (was Re: Single PV startup vs multiple PV startup)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2006-07-28 at 14:44 -0700, Jeremy Fitzhardinge wrote:
> Eric W. Biederman wrote:
> > Not really no.
> > So my experience has been that for the kernel case it is easier to generate
> > nodes by hand in assembly then to get binutils to help me :(
> >   
> 
> I'm using this:
> 
> #define NOTE(name, type, desc)			\
> 	.align 4;				\
> 	.long 2f - 1f;	/* namesz */		\
> 	.long 4f - 3f;	/* descsz */		\
> 	.long type;				\
> 1:	.asciz name;				\
> 2:	.align 4;				\
> 3:	desc;					\
> 4:
> 
> to actually generate the notes in a .note.xen section, but then I need 
> to do something to make ld actually create a PT_NOTE segment from this.  
> I haven't tried linking it yet, but I assume there's no magic default...

Yeah, it's a real pain. :( You could try adapting
arch/powerpc/boot/addnote.c as a starting point.

-- 
Hollis Blanchard
IBM Linux Technology Center



[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux