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>
This commit is contained in:
dfr 1999-05-07 22:09:18 +00:00
parent 9dde455f7c
commit 7df3cd7253
4 changed files with 19 additions and 35 deletions

View File

@ -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_
@ -108,21 +108,6 @@ typedef struct {
} d_un;
} 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.
*/

View File

@ -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_
@ -109,21 +109,6 @@ typedef struct {
} d_un;
} 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.
*/

View File

@ -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. */

View File

@ -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);