Blame csu/abi-note.S

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