Linker error with Cygwin

18 views
Skip to first unread message

Foximulder

unread,
Jun 4, 2011, 3:04:43 AM6/4/11
to em...@googlegroups.com
Hi,
I want to build the binary with Cygwin, but....
 
make config PROJECT=x86 PROFILE=console
 
I get a linker error....
 
ld -static -nostdlib --cref --relax -T ./build/base/obj/embox.lds ./src/kernel/nosys.lds -N -g \
                ./build/base/obj/src/kernel/critical/count.o \
                ./build/base/obj/src/kernel/irq.o \
                ./build/base/obj/src/kernel/init.o \
                ./build/base/obj/src/kernel/nosys.o \
                ./build/base/obj/src/kernel/softirq.o \
                ./build/base/obj/src/kernel/thread/core.o \
                ./build/base/obj/src/kernel/thread/sched.o \
                ./build/base/obj/src/kernel/thread/sched_policy/priority_based.o \
                ./build/base/obj/src/kernel/thread/sync/pipe_manager.o \
                ./build/base/obj/src/kernel/thread/sync/mutex.o \
                ./build/base/obj/src/kernel/thread/sync/message.o \
                ./build/base/obj/src/kernel/timer.o \
                ./build/base/obj/src/cmds/cat.o \
                ./build/base/obj/src/cmds/esh/esh.o \
                ./build/base/obj/src/cmds/help.o \
                ./build/base/obj/src/cmds/ls.o \
                ./build/base/obj/src/cmds/lsmod.o \
                ./build/base/obj/src/cmds/lspnp.o \
                ./build/base/obj/src/cmds/man.o \
                ./build/base/obj/src/cmds/mem.o \
                ./build/base/obj/src/cmds/mount.o \
                ./build/base/obj/src/cmds/readelf.o \
                ./build/base/obj/src/cmds/rm.o \
                ./build/base/obj/src/cmds/runelf.o \
                ./build/base/obj/src/cmds/test.o \
                ./build/base/obj/src/cmds/wmem.o \
                ./build/base/obj/src/drivers/ambapp/amba_registry.o \
                ./build/base/obj/src/drivers/ambapp/ambapp.o \
                ./build/base/obj/src/drivers/clock/pit.o \
                ./build/base/obj/src/drivers/interrupt/apic.o \
                ./build/base/obj/src/drivers/keyboard/keyboard.o \
                ./build/base/obj/src/drivers/serial/serial_port.o \
                ./build/base/obj/src/drivers/char/vtbuild.o \
                ./build/base/obj/src/drivers/char/vtparse.o \
                ./build/base/obj/src/drivers/char/vtparse_state.o \
                ./build/base/obj/src/drivers/char/terminal.o \
                ./build/base/obj/src/fs/file.o \
                ./build/base/obj/src/fs/filesystems.o \
                ./build/base/obj/src/fs/vfs.o \
                ./build/base/obj/src/fs/devfs/devfs.o \
                ./build/base/obj/src/fs/fs_driver.o \
                ./build/base/obj/src/fs/node.o \
                ./build/base/obj/src/fs/ramfs/ramfs.o \
                ./build/base/obj/src/fs/rootfs/rootfs.o \
                ./build/base/obj/src/arch/x86/kernel/arch.o \
                ./build/base/obj/src/arch/x86/kernel/context.o \
                ./build/base/obj/src/arch/x86/kernel/context_switch.o \
                ./build/base/obj/src/arch/x86/kernel/boot.o \
                ./build/base/obj/src/arch/x86/kernel/idt.o \
                ./build/base/obj/src/arch/x86/kernel/boot_idt.o \
                ./build/base/obj/src/arch/x86/kernel/irq_handler.o \
                ./build/base/obj/src/arch/x86/kernel/gdt.o \
                ./build/base/obj/src/arch/x86/kernel/gdt_flush.o \
                ./build/base/obj/src/tests/recursion/stack_recursion.o \
                ./build/base/obj/src/tests/setjmp/setjmp.o \
                ./build/base/obj/depsinject.o \
        -L./build/base/lib \
                -lutil \
                -ltest \
                -llinux \
                -lframework \
                -larch \
                -lc \
        -Map build/base/bin/embox.map \
        -o   build/base/bin/embox
ld: cannot perform PE operations on non PE output file 'build/base/bin/embox'.
make[2]: *** [build/base/bin/embox] Error 1
make[1]: *** [build_base_target] Error 2
make: *** [all] Error 2
 
 
Can anyone help me please, has anyone the same error? Whats wrong?
 
foximulder
 

Eldar Abusalimov

unread,
Jun 4, 2011, 5:28:58 AM6/4/11
to em...@googlegroups.com
Hi,

We haven't tested x86-port on Cygwin. But I think the problem is that you use linker configured only for PE targets (default for Windows). Embox needs ELF support from the linker (elf32-i386).

Try
ld --help | grep target
It will display targets supported by your linker.

I would also tried to play with --format and --oformat flags.

The same problem has been discussed here: http://forum.osdev.org/viewtopic.php?f=13&t=18549

2011/6/4 Foximulder <geral...@aon.at>



--
Best regards,
Eldar Sh. Abusalimov
Reply all
Reply to author
Forward
0 new messages