Giter VIP home page Giter VIP logo

Comments (7)

tavip avatar tavip commented on September 15, 2024

The question is just - what would be the advisable approach - go for 64bit and try to solve the incompatibilities or rather go for 32bit and try to solve incompatibilities?

I don't know :) But I think it will require significant changes to support 32bit longs. And we need to do that without too much intrusion in the kernel.

If someone smarter than me is already working on this I will just drop it :)

I don't plan to look into this in the next couple of months.

from linux.

spoiledsport avatar spoiledsport commented on September 15, 2024

I am trying to open this one again. I have been able to compile 64bit version in windows using MSYS2. I made very few directed changes in two makefiles and one KConfig file to address missing pe-x86-64. The compilation proceed normally. It generate the vmlinux file.

using the objdump command
objdump -f vmlinux

I get
vmlinux: file format pe-x86-64
architecture: i386:x86-64, flags 0x00000039:
HAS_RELOC, HAS_DEBUG, HAS_SYMS, HAS_LOCALS
start address 0x0000000000000000

Looks good. The problem is that linking the dll is failing. I already rollback to binutils 2.6. I am getting the following errors

$ make -C tools/lkl V=1
make: Entering directory '/e/Dev/GitHub/lkl/linux/tools/lkl'
make -f /e/Dev/GitHub/lkl/linux/tools/build/Makefile.build dir=lib obj=lkl
gcc -shared -o /e/Dev/GitHub/lkl/linux/tools/lkl/liblkl.dll /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o -lws2_32
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_mkdir': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:464: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:464:(.text+0x103): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_mount':
/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:539: undefined reference to lkl_syscall' /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:539:(.text+0x166): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_rmdir': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:467: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:467:(.text+0x199): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_umount':
/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:533: undefined reference to lkl_syscall' /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:533:(.text+0x214): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_nanosleep': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:254: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:254:(.text+0x25a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:356: more undefined references to lkl_syscall' follow
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_open': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:356:(.text+0x2d7): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_lseek': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:371:(.text+0x39a): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_close': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:365:(.text+0x3ea): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_getdents64': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:506:(.text+0x47e): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_open': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:356:(.text+0x6b9): relocation truncated to fit: R_X86_64_PC32 against undefined symbol lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_read': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:374:(.text+0x6fe): additional relocation overflows omitted from the output /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function virtio_dev_setup':
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.c:529: undefined reference to lkl_get_free_irq' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.c:550: undefined reference to lkl_is_running'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_virtio_mmio_device_add': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:2: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function virtio_dev_setup': /e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.c:555: undefined reference to lkl_put_irq'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function virtio_dev_cleanup': /e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.c:582: undefined reference to lkl_is_running'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_open': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:356: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_write': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:377: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_close': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:365: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function virtio_dev_cleanup': /e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.c:618: undefined reference to lkl_put_irq'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_umount': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:533: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function virtio_deliver_irq': /e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.c:84: undefined reference to lkl_trigger_irq'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_open': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:356: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_read': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:374: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_close': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:365: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_open': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:356: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o: In function lkl_sys_write': /e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:377: undefined reference to lkl_syscall'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:/e/Dev/GitHub/lkl/linux/tools/lkl/include/lkl/asm/syscall_defs.h:365: more undefined references to `lkl_syscall' follow
collect2: error: ld returned 1 exit status
make: *** [Makefile:148: /e/Dev/GitHub/lkl/linux/tools/lkl/liblkl.dll] Error 1
make: Leaving directory '/e/Dev/GitHub/lkl/linux/tools/lkl'

Any ideas?

from linux.

Rondom avatar Rondom commented on September 15, 2024

MSYS2/Cygwin are LP64, so there is no problem there. This issue is about "native" MinGW 64-bit, which is LLP64.

Therefore I think what you are describing is some other issue.

from linux.

spoiledsport avatar spoiledsport commented on September 15, 2024

Rondom

MinGW has nothing to do with this. This is MSYS2. The problem is not related to LP64/LLP64. This is related to problems with GCC. I see that this is a common problem with large codebases. I actually changed the build configuration to LD in the Makefile as suggested in many different newsgroups., but that came up with different issues.

I added the link options -mcmodel=large -shared, now I am getting a different set of errors

ld -r -o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/fs.o /e/Dev/GiHub/lkl/linux/tools/lkl/lib/iomem.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/net.o /e/Dev/GitHub/lkl/linux/tools/lk/lib/jmp_buf.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/nt-host.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/utils.o /e/ev/GitHub/lkl/linux/tools/lkl/lib/virtio_blk.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/virtio.o /e/Dev/GitHub/lkl/inux/tools/lkl/lib/dbg.o /e/Dev/GitHub/lkl/linux/tools/lkl/lib/dbg_handler.o
ar -rc /e/Dev/GitHub/lkl/linux/tools/lkl/liblkl.a /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o /e/Dev/GitHub/ll/linux/tools/lkl/lib/lkl.o
gcc -shared -o /e/Dev/GitHub/lkl/linux/tools/lkl/liblkl.dll /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o /e/De/GitHub/lkl/linux/tools/lkl/lib/lkl.o -lws2_32
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:fs.c:(.rdata$.refptr.lkl_syscall[.refptr.lkl_syscall]+0x0): undefned reference to lkl_syscall' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:fs.c:(.rdata$.refptr.lkl_put_irq[.refptr.lkl_put_irq]+0x0): undefned reference to lkl_put_irq'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:fs.c:(.rdata$.refptr.lkl_is_running[.refptr.lkl_is_running]+0x0):undefined reference to lkl_is_running' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:fs.c:(.rdata$.refptr.lkl_get_free_irq[.refptr.lkl_get_free_irq]+00): undefined reference to lkl_get_free_irq'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl-in.o:fs.c:(.rdata$.refptr.lkl_trigger_irq[.refptr.lkl_trigger_irq]+0x0: undefined reference to lkl_trigger_irq' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xb478): relocation truncated to fit: rva32 against exit.text'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xb47c): relocation truncated to fit: rva32 against exit.text' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xd8f0): relocation truncated to fit: rva32 against exit.text'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xd8f4): relocation truncated to fit: rva32 against exit.text' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xec4c): relocation truncated to fit: rva32 against exit.text'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xec50): relocation truncated to fit: rva32 against exit.text' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xec58): relocation truncated to fit: rva32 against exit.text'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xec5c): relocation truncated to fit: rva32 against exit.text' /e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xf1bc): relocation truncated to fit: rva32 against exit.text'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xf1c0): relocation truncated to fit: rva32 against `exit.text'
/e/Dev/GitHub/lkl/linux/tools/lkl/lib/lkl.o:main.c:(.pdata+0xf1c8): additional relocation overflows omitted fromthe output
collect2: error: ld returned 1 exit status
make: *** [Makefile:148: /e/Dev/GitHub/lkl/linux/tools/lkl/liblkl.dll] Error 1
make: Leaving directory '/e/Dev/GitHub/lkl/linux/tools/lkl'

from linux.

spoiledsport avatar spoiledsport commented on September 15, 2024

I will open a new issue with more clean understanding and explanation

from linux.

spoiledsport avatar spoiledsport commented on September 15, 2024

#306

from linux.

Rondom avatar Rondom commented on September 15, 2024

I think there was a misunderstanding. What I meant to say was that your MSYS2-linker-issue is unrelated to this one and is thus better dealt with in a separate issue.

from linux.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.