[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

ELF migration: some answers

Note: when I talk about packages here, I don't mean packages in general,
but only development packages (like compiler, linker, binary utilities etc).

Q What are The Fine Manuals?
A * 'ELF: From The Programmer's Perspective" by H.J. Lu.
    HTML version near http://www.debian.org/Documentation
    PostScript version is at 
    This document explains what ELF is and isn't, new compiler/linker
    options etc. 
  * The Linux & ELF webpage at http://sable.ox.ac.uk/~jo95004/elf.html
    This explains most of the other changes in libc5: dirent, DIR, 
    no termcap or curses.
  * The ELF HowTo (http://sable.ox.ac.uk/~jo95004/elf-howto.html), 
    especially the 'Building programs in ELF' section.

Q What's different for ELF wrt/ control files?
A Not much. Only add a dependency on 'libc5'.

Q What will be the directory structure for includes and libraries?
A Debian is to be FSSTND-compliant, and ELF.
  This means that includes go into /usr/include for normal libraries, 
  and into /usr/include/<name>/ for extra libraries (e.g. /usr/include/gdbm/); 
  the libraries themselves (both static and shared) go into /usr/lib, except 
  when needed by the base system. 
  The old a.out format is treated as a cross-compile targes. This means that
  it's includes and libraries go into /usr/i486-linuxaout/{include,lib}.

Q What is the current directory structure?
A A mess :-) We're still in migration. Some ELF packages (those with the
  explicit elf- prefix) haven't been updated yet, so they are still in 
  /usr/i486-linuxelf. Some a.out packages haven't been updated yet (those
  without a aout- prefix), so they still use /usr/{lib,include}.

Q [Kenny Wickstrom] Where is libtermcap.a for ELF?
A There is none. The linux gcc/libc developers have decided to drop
  libtermcap and libcurses; they are replaced by libncurses. 
  Changing or adding some -I and -l flags should do the trick.
  This is one of the essentially non-ELF related changes in libc5; 
  see the ELF web page.

Q [Andrew Howell] When do you use fpic?	
A It's -fPIC (or -fpic; this makes no difference on i386. -fpic is
  more restrictive than -fPIC on other architectures, so please use -fPIC).
  -fPIC enable Position Independent Code, which is the nifty feature
  that makes shared libraries under ELF very easy. 
  It is useful only for making shared libraries. Since it reserves
  one register, it make code slower, so please do not use it for normal
  programs and static libraries. 

Q [Andrew Howell] What compiler options should we be using for compiling 
  stuff under elf?
A The same as for a.out. The options for shared libraries are explained in 
  H.J. Lu's "ELF From The Programmer's Perspective".

Q How do I build a.out binaries in the new situation?
A To get to gcc, ld etc., put '/usr/i486-linuxaout/bin' in your PATH before
  /usr/bin. Add '-I' and '-L' directives for libraries & headers that 
  have migrated already.

E I still have a Q! 
R Then please ask it on debian-devel. 

Hope this helps,
UNFAIR  Term applied to advantages enjoyed by other people which we tried 
to cheat them out of and didn't manage. See also DISHONESTY, SNEAKY, 
- The Hipcrime Vocab by Chad C. Mulligan  

Reply to: