FreeBSD port (57): ABI tag

Bruno Haible bruno@clisp.org
Fri Sep 20 07:24:00 GMT 2002


There are not a lot of FreeBSD specific patches to come any more, therefore
here again the patch to define the ELF ABI note format. Neither the FreeBSD
kernel nor binutils have particular support for this ELF section, therefore
I'm free to choose any ABI note contents.


2002-09-04  Bruno Haible  <bruno@clisp.org>

	* abi-tags: Add support for FreeBSD.
	* elf/cache.c (print_entry): Support the GNU/FreeBSD ABI tag.

diff -r -c3 glibc-20020910.bak/abi-tags glibc-20020910/abi-tags
*** glibc-20020910.bak/abi-tags	Tue Sep  7 16:45:28 1999
--- glibc-20020910/abi-tags	Tue Sep 17 02:22:02 2002
***************
*** 22,26 ****
--- 22,28 ----
  
  .*-sun-solaris2.*	2	2.0.0	# just an arbitrary value
  
+ .*-.*-freebsd.*-gnu.*	3	4.0.0	# earliest compatible kernel version
+ 
  # There is no catch-all default here because every supported OS that uses
  # ELF must have its own unique ABI tag.
diff -r -c3 glibc-20020910.bak/elf/cache.c glibc-20020910/elf/cache.c
*** glibc-20020910.bak/elf/cache.c	Mon Apr  8 20:31:26 2002
--- glibc-20020910/elf/cache.c	Tue Sep 17 02:22:02 2002
***************
*** 104,115 ****
  	[0] = "Linux",
  	[1] = "Hurd",
  	[2] = "Solaris",
! 	[3] = N_("Unknown OS")
        };
        unsigned int os = osversion >> 24;
  
        printf (_(", OS ABI: %s %d.%d.%d"),
! 	      _(abi_tag_os[os > 3 ? 3 : os]),
  	      (osversion >> 16) & 0xff,
  	      (osversion >> 8) & 0xff,
  	      osversion & 0xff);
--- 104,116 ----
  	[0] = "Linux",
  	[1] = "Hurd",
  	[2] = "Solaris",
! 	[3] = "FreeBSD",
! 	[4] = N_("Unknown OS")
        };
        unsigned int os = osversion >> 24;
  
        printf (_(", OS ABI: %s %d.%d.%d"),
! 	      _(abi_tag_os[os > 4 ? 4 : os]),
  	      (osversion >> 16) & 0xff,
  	      (osversion >> 8) & 0xff,
  	      osversion & 0xff);



More information about the Libc-alpha mailing list