Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SOLVED: .c32 files in syslinux are ELF instead of COM32
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
jwezel
n00b
n00b


Joined: 29 Jan 2003
Posts: 58
Location: Birr, Switzerland

PostPosted: Thu Feb 23, 2017 8:31 pm    Post subject: SOLVED: .c32 files in syslinux are ELF instead of COM32 Reply with quote

I wanted to include a LUA interpreter into a SystemRescueCd, so I copied /usr/share/syslinux/lua.c32 and /usr/share/syslinux/liblua.c32 into the source root (./isolinux) and built the USB-stick again. Upon boot SYSLINUX complained that lua.c32 was not a COM32 format. When I checked /usr/share/syslinux/lua.c32 with the file program, it said it's an ELF file. But what's the point of that? .c32 files are supposed to be in COM32 format.

How do I make this work?
_________________
Johnny Wezel


Last edited by jwezel on Fri Feb 24, 2017 10:06 pm; edited 1 time in total
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7116
Location: almost Mile High in the USA

PostPosted: Fri Feb 24, 2017 7:32 pm    Post subject: Reply with quote

What version of syslinux are you using?

Anyway it is strange, a freshly unpacked syslinux:
Code:
subaru:/tmp/syslinux-5.10/com32/lua/src$ file lua.c32
lua.c32: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

So it came with ELF files!
But it appears to be invalid for full linux systems:
Code:
subaru:/tmp/syslinux-5.10/com32/lua/src$ ./lua.c32
Segmentation fault


Hmm...

However syslinux-4.0.7 contains proper com32 files:
Code:
subaru:/tmp/syslinux-4.07/com32/lua/src$ file lua.c32
lua.c32: COM executable (32-bit COMBOOT, relocatable)


Weird, upstream issue I think? Alas I'm not a syslinux user at least on this box (yet)...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
jwezel
n00b
n00b


Joined: 29 Jan 2003
Posts: 58
Location: Birr, Switzerland

PostPosted: Fri Feb 24, 2017 10:05 pm    Post subject: Reply with quote

eccerr0r wrote:
What version of syslinux are you using?

I tried with 6.04.

Quote:
However syslinux-4.0.7 contains proper com32 files:
Code:
subaru:/tmp/syslinux-4.07/com32/lua/src$ file lua.c32
lua.c32: COM executable (32-bit COMBOOT, relocatable)


Weird, upstream issue I think? Alas I'm not a syslinux user at least on this box (yet)...


Wow, how did you get to the idea to try 4.07? Did you have it lie around?

Anyway, I can confirm, it works. I'm going to analyze what the differences in the Makefiles are between those two versions. Maybe that way I can make changes to 6.04 to build the right .c32 programs.[/quote]
_________________
Johnny Wezel
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7116
Location: almost Mile High in the USA

PostPosted: Fri Feb 24, 2017 10:59 pm    Post subject: Reply with quote

I just so happened to have a copy of 4.07 around but I didn't investigate until after I found that 5.10 had the files prebuilt and continued to build ELF, so naturally I suspected it should have worked at some point and best to just look at an older version.

I had initially thought that this was an issue with ld.gold as this linker only deals with ELF, but upon building 5.10 it was bad, so something's wrong with the makefile.

Not sure why it did not trip the packagers of syslinux. Seems like a serious bug here.
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13761

PostPosted: Sat Feb 25, 2017 1:57 am    Post subject: Reply with quote

As a possibly related point, there is a comment in the ebuild:
Code:
# This ebuild is a departure from the old way of rebuilding everything in syslinux
# This departure is necessary since hpa doesn't support the rebuilding of anything other
# than the installers.
I read this to mean that the files you are examining were built once by upstream and shipped as-is, not rebuilt with the user's choice of compiler/linker. Perhaps the Gentoo maintainer for syslinux checked only that the basic functionality still worked, but did not experiment with the advanced c32 files.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7116
Location: almost Mile High in the USA

PostPosted: Sat Feb 25, 2017 3:59 am    Post subject: Reply with quote

Actually I think the syslinux guys dropped the ball here, I'm not sure what anyone could do with those c32 that are shipped with the tarball, regardless of architecture...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
jwezel
n00b
n00b


Joined: 29 Jan 2003
Posts: 58
Location: Birr, Switzerland

PostPosted: Sat Feb 25, 2017 7:40 am    Post subject: Reply with quote

So there is no way of building the .c32 files on Linux, a pre-built version was shipped along with the source and they discontinued that practice after version 4, it seems. :(
_________________
Johnny Wezel
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum