LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 07-20-2021, 10:35 AM   #1
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,354

Rep: Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066
kernel & binutils


As mentioned in the kernel thread

the kernel doc :
Code:
CONFIG_X86_X32:
Include code to run binaries for the x32 native 32-bit ABI
for 64-bit processors.  An x32 process gets access to the
full 64-bit register file and wide data path while leaving
pointers at 32 bits for smaller memory footprint.

You will need a recent binutils (2.22 or later) with
elf32_x86_64 support enabled to compile a kernel with this
option set.
http://ftp.slackware.com/pub/slackwa...ils.SlackBuild
Code:
# Build for an x86 glibc2-based Linux system:
CFLAGS="$SLKCFLAGS" \
./configure \
  --prefix=/usr \
  --libdir=/usr/lib${LIBDIRSUFFIX} \
  --mandir=/usr/man \
  --infodir=/usr/info \
  --with-docdir=/usr/doc/binutils-$VERSION \
  --disable-compressed-debug-sections \
  --enable-shared \
  --enable-multilib \
  --enable-64-bit-bfd \
  --enable-plugins \
  --enable-threads \
  --enable-targets=i386-efi-pe,${TARGET} \
  --enable-install-libiberty \
  --enable-gold=yes \
  --enable-ld=default \
  --enable-initfini-array \
  $WERROR \
  --build=$TARGET \
  || exit 1
Could binutils be compiled with elf32_x86_64 support enabled ?

Last edited by marav; 07-21-2021 at 09:08 AM.
 
Old 07-20-2021, 10:39 AM   #2
LuckyCyborg
Senior Member
 
Registered: Mar 2010
Posts: 3,500

Rep: Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308Reputation: 3308
Well, I think this is intentional. Years ago was heated discussions regarding Slackware and multilib.

So, the kernel is "multilib" , while the operating system is not.

Last edited by LuckyCyborg; 07-20-2021 at 10:55 AM.
 
Old 07-20-2021, 10:57 AM   #3
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,354

Original Poster
Rep: Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066
so, I probably don't use 32b software ...
let's go :-)
 
Old 07-20-2021, 11:47 AM   #4
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
There's an unofficial multilib version of LFS that includes this architecture. I can't remember who maintains it but there are a couple of threads on it in the LFS forum.
 
Old 07-20-2021, 03:34 PM   #6
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,781

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
Quote:
Originally Posted by LuckyCyborg View Post
So, the kernel is "multilib" , while the operating system is not.
And binutils is.
Code:
$ ld --help|grep targets:
ld: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 pei-i386 pe-x86-64 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-i386 pe-bigobj-i386 srec symbolsrec verilog tekhex binary ihex plugin
 
Old 07-20-2021, 05:46 PM   #7
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,354

Original Poster
Rep: Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066
Quote:
Originally Posted by Petri Kaukasoina View Post
And binutils is.
Code:
$ ld --help|grep targets:
ld: supported targets: elf64-x86-64 elf32-i386 elf32-iamcu elf32-x86-64 pei-i386 pe-x86-64 pei-x86-64 elf64-l1om elf64-k1om elf64-little elf64-big elf32-little elf32-big pe-i386 pe-bigobj-i386 srec symbolsrec verilog tekhex binary ihex plugin
I've seen your post Petri
That's why I made this request
 
Old 07-21-2021, 02:46 AM   #8
Petri Kaukasoina
Senior Member
 
Registered: Mar 2007
Posts: 1,781

Rep: Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459Reputation: 1459
OK, but in this post https://www.linuxquestions.org/quest...ml#post6267470 I showed that ld makes an elf32_x86_64 exe from an elf32_x86_64 object. After that file tells it's 'ELF 32-bit LSB executable, x86-64'. An ordinary 64-bit exe of slackware64 is 'ELF 64-bit LSB executable, x86-64' and in the 32-bit slackware it's 'ELF 32-bit LSB executable, Intel 80386'. So, elf32-x86-64 is already supported is slackware64, as is elf32-i386. Alien Bob's multilib also does not replace binutils, even though you can't see elf32-i386 in the configure command you copied in your original post.
 
Old 07-21-2021, 03:04 AM   #9
marav
LQ Sage
 
Registered: Sep 2018
Location: Gironde
Distribution: Slackware
Posts: 5,354

Original Poster
Rep: Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066Reputation: 4066
I just don't like warnings :-)
so I removed the 32bits support in the kernel
 
Old 07-21-2021, 09:37 AM   #10
davjohn
Member
 
Registered: Jan 2017
Posts: 94

Rep: Reputation: Disabled
This is not "normal" 32bit support.
This is x32 ABI, it's kind of hybrid between 32 and 64bit.
It's running in 64 bit mode but uses 32bit pointers. I don't know if this is really used anywhere.
 
Old 07-21-2021, 09:59 AM   #11
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 7,571
Blog Entries: 19

Rep: Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451Reputation: 4451
Turned out one of those LFS threads I mentioned was mine! It contains a discussion of -x32 versus -32 and -64.
https://www.linuxquestions.org/quest...st-4175684753/.

I hope this kind of absent-mindedness isn't an early sign of dementia.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nvidia display drivers installation error with binutils, binutils allready installed mandrakeBren Linux - Newbie 9 01-06-2009 12:52 PM
binutils-2.16.1 or binutils-2.17 Hern_28 Linux From Scratch 2 07-15-2007 09:05 AM
Phục hồi dữ liệu bị mất???, cứ pollsite General 1 06-27-2005 12:39 PM
Installation of binutils....can't mkdir...../binutils-build hmonster Linux From Scratch 6 08-22-2004 04:07 AM
Gotta love those ٱٱٱٱٱٱٱ&# iLLuSionZ Linux - General 5 11-18-2003 07:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration