summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>1999-05-07 22:09:18 +0000
committerdfr <dfr@FreeBSD.org>1999-05-07 22:09:18 +0000
commitf7cb93212ea82218f8a88a75fae0090e456d292f (patch)
tree63c2bee714dfd5242185230fa6b1be1ac3c651c5
parent551edfd501742780800c82e0fec0ecab4864f77c (diff)
downloadFreeBSD-src-f7cb93212ea82218f8a88a75fae0090e456d292f.zip
FreeBSD-src-f7cb93212ea82218f8a88a75fae0090e456d292f.tar.gz
The structure Elf_Note does not have 32 and 64 bit variants but always
has 32bit fields. This change allows FreeBSD/alpha to generate well-formed ELF corefiles. Reviewed by: John Polstra <jdp@polstra.com>
-rw-r--r--sys/sys/elf32.h17
-rw-r--r--sys/sys/elf64.h17
-rw-r--r--sys/sys/elf_common.h17
-rw-r--r--sys/sys/elf_generic.h3
4 files changed, 19 insertions, 35 deletions
diff --git a/sys/sys/elf32.h b/sys/sys/elf32.h
index 092a4c4..d88ef2c 100644
--- a/sys/sys/elf32.h
+++ b/sys/sys/elf32.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: elf32.h,v 1.4 1998/08/16 03:03:38 jdp Exp $
+ * $Id: elf32.h,v 1.5 1998/09/14 20:30:13 jdp Exp $
*/
#ifndef _SYS_ELF32_H_
@@ -109,21 +109,6 @@ typedef struct {
} Elf32_Dyn;
/*
- * Note header. The ".note" section contains an array of notes. Each
- * begins with this header, aligned to a word boundary. Immediately
- * following the note header is n_namesz bytes of name, padded to the
- * next word boundary. Then comes n_descsz bytes of contents, again
- * padded to a word boundary. The values of n_namesz and n_descsz do
- * not include the padding.
- */
-
-typedef struct {
- Elf32_Size n_namesz; /* Length of name. */
- Elf32_Size n_descsz; /* Length of descriptor. */
- Elf32_Word n_type; /* Type of this note. */
-} Elf32_Note;
-
-/*
* Relocation entries.
*/
diff --git a/sys/sys/elf64.h b/sys/sys/elf64.h
index 35f2275..464815a 100644
--- a/sys/sys/elf64.h
+++ b/sys/sys/elf64.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: elf64.h,v 1.6 1998/09/12 08:36:09 dfr Exp $
+ * $Id: elf64.h,v 1.7 1998/09/14 20:30:13 jdp Exp $
*/
#ifndef _SYS_ELF64_H_
@@ -110,21 +110,6 @@ typedef struct {
} Elf64_Dyn;
/*
- * Note header. The ".note" section contains an array of notes. Each
- * begins with this header, aligned to a word boundary. Immediately
- * following the note header is n_namesz bytes of name, padded to the
- * next word boundary. Then comes n_descsz bytes of descriptor, again
- * padded to a word boundary. The values of n_namesz and n_descsz do
- * not include the padding.
- */
-
-typedef struct {
- Elf64_Size n_namesz; /* Length of name. */
- Elf64_Size n_descsz; /* Length of descriptor. */
- Elf64_Word n_type; /* Type of this note. */
-} Elf64_Note;
-
-/*
* Relocation entries.
*/
diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h
index 79cf597..7785d20 100644
--- a/sys/sys/elf_common.h
+++ b/sys/sys/elf_common.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: elf_common.h,v 1.2 1998/09/08 20:38:06 jdp Exp $
+ * $Id: elf_common.h,v 1.3 1998/09/14 20:30:13 jdp Exp $
*/
#ifndef _SYS_ELF_COMMON_H_
@@ -33,6 +33,21 @@
* ELF definitions that are independent of architecture or word size.
*/
+/*
+ * Note header. The ".note" section contains an array of notes. Each
+ * begins with this header, aligned to a word boundary. Immediately
+ * following the note header is n_namesz bytes of name, padded to the
+ * next word boundary. Then comes n_descsz bytes of descriptor, again
+ * padded to a word boundary. The values of n_namesz and n_descsz do
+ * not include the padding.
+ */
+
+typedef struct {
+ u_int32_t n_namesz; /* Length of name. */
+ u_int32_t n_descsz; /* Length of descriptor. */
+ u_int32_t n_type; /* Type of this note. */
+} Elf_Note;
+
/* Indexes into the e_ident array. */
#define EI_MAG0 0 /* Magic number, byte 0. */
#define EI_MAG1 1 /* Magic number, byte 1. */
diff --git a/sys/sys/elf_generic.h b/sys/sys/elf_generic.h
index 7ab479e..bc1203b 100644
--- a/sys/sys/elf_generic.h
+++ b/sys/sys/elf_generic.h
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: elf_generic.h,v 1.1 1998/08/16 03:03:38 jdp Exp $
+ * $Id: elf_generic.h,v 1.2 1998/09/14 20:30:13 jdp Exp $
*/
#ifndef _SYS_ELF_GENERIC_H_
@@ -64,7 +64,6 @@ __ElfType(Ehdr);
__ElfType(Shdr);
__ElfType(Phdr);
__ElfType(Dyn);
-__ElfType(Note);
__ElfType(Rel);
__ElfType(Rela);
__ElfType(Sym);
OpenPOWER on IntegriCloud