Monday, January 08, 2007

elf2flt porting

Things needed to be changed
1. elf2flt.ld 2. elf2flt.c (elf2flt tool) 3. binfmt_flat.c (in kernel)

elf2flt.c (around line 1300)
case SCOPE_SPG290:
relocation_needed = 1;
pflags = 0x40000; // need to fix this value
sym_vma = bfd_section_vma(abs_bfd, sym_section);
sym_addr += sym_vma + q->addend;
sym_addr &= 0x000003ff;
sym_addr |= (
htonl(*(unsigned long *)r_mem)
& 0xfffffc00
);
break;

--
ld-elf2flt -- A linker replacement that implements a -elf2flt option for the
linker and runs elf2flt automatically for you. It auto
detects PIC/non-PIC code and adjusts its option accordingly.
It uses the environment variable FLTFLAGS when running
elf2flt. It runs /.../m68k-elf-ld.real to do the actual
linking.

0 Comments:

Post a Comment

<< Home