3.7 on x86-64: No success

2007-10-17
2013-05-02
  • After going round the houses, that is:

    #LDFLAGS           = -nostdlib -znocombreloc
    LDFLAGS    = -nostdlib

    because -znocombreloc is not recognized

    and adding

    # a rule for .S
    %.o: %.S
            $(CC) $(INCDIR) $(CFLAGS) $(CPPFLAGS) -c $< -o $@

    in Make.rules in gnu-efi-3.0d (so crt0-efi-x86_64.o gets compiled with -fpic)

    I still bummer:

    /usr/bin/gcc -nostdlib -T /usr/local/lib/elf_x86_64_efi.lds -shared -Bsymbolic -L/usr/local/lib -L/usr/local/lib /usr/local/lib/crt0-efi-x86_64.o  elilo.o -lefi -lgnuefi /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/libgcc.a  -o elilo
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/local/lib/crt0-efi-x86_64.o: relocation R_X86_64_PC32 against `ImageBase' can not be used when making a shared object; recompile with -fPIC
    /usr/lib/gcc/x86_64-pc-linux-gnu/4.1.2/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
    collect2: ld returned 1 exit status
    make: *** [elilo] Error 1

    My config:

    Gentoo

    Gcc 4.1.2
    binutils 2.8-r1

    objcopy: supported targets: elf64-x86-64 elf32-i386 a.out-i386-linux efi-app-ia32 efi-app-x86_64 elf64-little elf64-big elf32-little elf32-big srec symbolsrec tekhex binary ihex

    Everything on a x86_64 - of course (Dual 5148 Woodcrest, Blackford 5000P Server)
    I need it, because there is a small GPT 5,25TB RAID I'd like to boot from...

    Any hints?