[uClinux-dev] porting elf2flt

John Williams jwilliams at itee.uq.edu.au
Mon Mar 31 01:17:32 EST 2003


HAving got aound various issues re: Cygwin and elf2flt, I've got a 
compiled binary.  However, the relocation stuff is all boilerplate so it 
doesn't actually do anything.

Can anybody tell me where I will find the information required to fill 
out the various entries in elf.h, and associated case statements in 

For example, from the v850 version, elf.h:

/* v850 relocations.  */
#define R_V850_NONE             0
#define R_V850_9_PCREL          1
#define R_V850_22_PCREL         2
#define R_V850_HI16_S           3
#define R_V850_HI16             4
#define R_V850_LO16             5
#define R_V850_32               6
#define R_V850_16               7
#define R_V850_8                8
#define R_V850_SDA_16_16_OFFSET 9       /* For ld.b, st.b, set1, clr1,
                                            not1, tst1, movea, movhi */
#define R_V850_SDA_15_16_OFFSET 10      /* For ld.w, ld.h, ld.hu, st.w, 
.h */
#define R_V850_ZDA_16_16_OFFSET 11      /* For ld.b, st.b, set1, clr1,
                                            not1, tst1, movea, movhi */
#define R_V850_ZDA_15_16_OFFSET 12      /* For ld.w, ld.h, ld.hu, st.w, 
st.h */

Where are these relocation types and numbers defined?  I realise they'll 
be different for each architecture, but it seems it's a standard 
mechanism for gcc compilers to generate elf output.

I didn't do the toolchain (gcc) port, but I do have access to the source.



More information about the uClinux-dev mailing list