Blame csu/abi-note.S

Packit 6c4009
/* Special .init and .fini section support.
Packit 6c4009
   Copyright (C) 1997-2018 Free Software Foundation, Inc.
Packit 6c4009
   This file is part of the GNU C Library.
Packit 6c4009
Packit 6c4009
   The GNU C Library is free software; you can redistribute it and/or
Packit 6c4009
   modify it under the terms of the GNU Lesser General Public
Packit 6c4009
   License as published by the Free Software Foundation; either
Packit 6c4009
   version 2.1 of the License, or (at your option) any later version.
Packit 6c4009
Packit 6c4009
   In addition to the permissions in the GNU Lesser General Public
Packit 6c4009
   License, the Free Software Foundation gives you unlimited
Packit 6c4009
   permission to link the compiled version of this file with other
Packit 6c4009
   programs, and to distribute those programs without any restriction
Packit 6c4009
   coming from the use of this file.  (The Lesser General Public
Packit 6c4009
   License restrictions do apply in other respects; for example, they
Packit 6c4009
   cover modification of the file, and distribution when not linked
Packit 6c4009
   into another program.)
Packit 6c4009
Packit 6c4009
   The GNU C Library is distributed in the hope that it will be useful,
Packit 6c4009
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit 6c4009
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit 6c4009
   Lesser General Public License for more details.
Packit 6c4009
Packit 6c4009
   You should have received a copy of the GNU Lesser General Public
Packit 6c4009
   License along with the GNU C Library; if not, see
Packit 6c4009
   <http://www.gnu.org/licenses/>.  */
Packit 6c4009
Packit 6c4009
/* Define an ELF note identifying the operating-system ABI that the
Packit 6c4009
   executable was created for.  The ELF note information identifies a
Packit 6c4009
   particular OS or coordinated development effort within which the
Packit 6c4009
   ELF header's e_machine value plus (for dynamically linked programs)
Packit 6c4009
   the PT_INTERP dynamic linker name and DT_NEEDED shared library
Packit 6c4009
   names fully identify the runtime environment required by an
Packit 6c4009
   executable.
Packit 6c4009
Packit 6c4009
   The general format of ELF notes is as follows.
Packit 6c4009
   Offsets and lengths are bytes or (parenthetical references) to the
Packit 6c4009
   values in other fields.
Packit 6c4009
Packit 6c4009
offset	length	contents
Packit 6c4009
0	4	length of name
Packit 6c4009
4	4	length of data
Packit 6c4009
8	4	note type
Packit 6c4009
12	(0)	vendor name
Packit 6c4009
		- null-terminated ASCII string, padded to 4-byte alignment
Packit 6c4009
12+(0)	(4)	note data,
Packit 6c4009
Packit 6c4009
   The GNU project and cooperating development efforts (including the
Packit 6c4009
   Linux community) use note type 1 and a vendor name string of "GNU"
Packit 6c4009
   for a note descriptor that indicates ABI requirements.  The note data
Packit 6c4009
   is four 32-bit words.  The first of these is an operating system
Packit 6c4009
   number (0=Linux, 1=Hurd, 2=Solaris, ...) and the remaining three
Packit 6c4009
   identify the earliest release of that OS that supports this ABI.
Packit 6c4009
   See abi-tags (top level) for details. */
Packit 6c4009
Packit 6c4009
#include <config.h>
Packit 6c4009
#include <abi-tag.h>		/* OS-specific ABI tag value */
Packit 6c4009
Packit 6c4009
/* The linker (GNU ld 2.8 and later) recognizes an allocated section whose
Packit 6c4009
   name begins with `.note' and creates a PT_NOTE program header entry
Packit 6c4009
   pointing at it. */
Packit 6c4009
Packit 6c4009
	.section ".note.ABI-tag", "a"
Packit 6c4009
	.p2align 2
Packit 6c4009
	.long 1f - 0f		/* name length */
Packit 6c4009
	.long 3f - 2f		/* data length */
Packit 6c4009
	.long  1		/* note type */
Packit 6c4009
0:	.asciz "GNU"		/* vendor name */
Packit 6c4009
1:	.p2align 2
Packit 6c4009
2:	.long __ABI_TAG_OS	/* note data: the ABI tag */
Packit 6c4009
	.long __ABI_TAG_VERSION
Packit 6c4009
3:	.p2align 2		/* pad out section */