Commit 340251e4 authored by Lucio De Re's avatar Lucio De Re Committed by Russ Cox

build: fix header files for Plan 9

The "elf.h" header changes involve only comments, the released
Plan 9 C preprocessing function does not cope with multiline
comments following the #define keyword.  All multiline comments
have been moved to the line above the associated definition.
Sigh!  Fixing the Plan 9 compiler is not an option.

<time.h> does not exist in the Plan 9 Native library.  I have
moved it from src/cmd/ld/pe.h to include/u.h. RSC correctly points
out that this copy of <u.h> is not the one used to compile the
Go release on Plan 9 platforms.

R=golang-dev
CC=golang-dev, rsc
https://golang.org/cl/4574042
parent a84e9d01
...@@ -69,6 +69,7 @@ extern "C" { ...@@ -69,6 +69,7 @@ extern "C" {
#include <math.h> #include <math.h>
#include <ctype.h> /* for tolower */ #include <ctype.h> /* for tolower */
#include <signal.h> #include <signal.h>
#include <time.h>
/* /*
* OS-specific crap * OS-specific crap
......
...@@ -262,8 +262,8 @@ typedef struct { ...@@ -262,8 +262,8 @@ typedef struct {
/* Values for d_tag. */ /* Values for d_tag. */
#define DT_NULL 0 /* Terminating entry. */ #define DT_NULL 0 /* Terminating entry. */
#define DT_NEEDED 1 /* String table offset of a needed shared /* String table offset of a needed shared library. */
library. */ #define DT_NEEDED 1
#define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */ #define DT_PLTRELSZ 2 /* Total size in bytes of PLT relocations. */
#define DT_PLTGOT 3 /* Processor-dependent address. */ #define DT_PLTGOT 3 /* Processor-dependent address. */
#define DT_HASH 4 /* Address of symbol hash table. */ #define DT_HASH 4 /* Address of symbol hash table. */
...@@ -276,8 +276,8 @@ typedef struct { ...@@ -276,8 +276,8 @@ typedef struct {
#define DT_SYMENT 11 /* Size of each symbol table entry. */ #define DT_SYMENT 11 /* Size of each symbol table entry. */
#define DT_INIT 12 /* Address of initialization function. */ #define DT_INIT 12 /* Address of initialization function. */
#define DT_FINI 13 /* Address of finalization function. */ #define DT_FINI 13 /* Address of finalization function. */
#define DT_SONAME 14 /* String table offset of shared object /* String table offset of shared object name. */
name. */ #define DT_SONAME 14
#define DT_RPATH 15 /* String table offset of library path. [sup] */ #define DT_RPATH 15 /* String table offset of library path. [sup] */
#define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */ #define DT_SYMBOLIC 16 /* Indicates "symbolic" linking. [sup] */
#define DT_REL 17 /* Address of ElfNN_Rel relocations. */ #define DT_REL 17 /* Address of ElfNN_Rel relocations. */
...@@ -285,30 +285,29 @@ typedef struct { ...@@ -285,30 +285,29 @@ typedef struct {
#define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */ #define DT_RELENT 19 /* Size of each ElfNN_Rel relocation. */
#define DT_PLTREL 20 /* Type of relocation used for PLT. */ #define DT_PLTREL 20 /* Type of relocation used for PLT. */
#define DT_DEBUG 21 /* Reserved (not used). */ #define DT_DEBUG 21 /* Reserved (not used). */
#define DT_TEXTREL 22 /* Indicates there may be relocations in /* Indicates there may be relocations in non-writable segments. [sup] */
non-writable segments. [sup] */ #define DT_TEXTREL 22
#define DT_JMPREL 23 /* Address of PLT relocations. */ #define DT_JMPREL 23 /* Address of PLT relocations. */
#define DT_BIND_NOW 24 /* [sup] */ #define DT_BIND_NOW 24 /* [sup] */
#define DT_INIT_ARRAY 25 /* Address of the array of pointers to /* Address of the array of pointers to initialization functions */
initialization functions */ #define DT_INIT_ARRAY 25
#define DT_FINI_ARRAY 26 /* Address of the array of pointers to /* Address of the array of pointers to termination functions */
termination functions */ #define DT_FINI_ARRAY 26
#define DT_INIT_ARRAYSZ 27 /* Size in bytes of the array of /* Size in bytes of the array of initialization functions. */
initialization functions. */ #define DT_INIT_ARRAYSZ 27
#define DT_FINI_ARRAYSZ 28 /* Size in bytes of the array of /* Size in bytes of the array of terminationfunctions. */
terminationfunctions. */ #define DT_FINI_ARRAYSZ 28
#define DT_RUNPATH 29 /* String table offset of a null-terminated /* String table offset of a null-terminated library search path string. */
library search path string. */ #define DT_RUNPATH 29
#define DT_FLAGS 30 /* Object specific flag values. */ #define DT_FLAGS 30 /* Object specific flag values. */
#define DT_ENCODING 32 /* Values greater than or equal to DT_ENCODING /* Values greater than or equal to DT_ENCODING and less than
and less than DT_LOOS follow the rules for DT_LOOS follow the rules for the interpretation of the d_un
the interpretation of the d_un union union as follows: even == 'd_ptr', even == 'd_val' or none */
as follows: even == 'd_ptr', even == 'd_val' #define DT_ENCODING 32
or none */ /* Address of the array of pointers to pre-initialization functions. */
#define DT_PREINIT_ARRAY 32 /* Address of the array of pointers to #define DT_PREINIT_ARRAY 32
pre-initialization functions. */ /* Size in bytes of the array of pre-initialization functions. */
#define DT_PREINIT_ARRAYSZ 33 /* Size in bytes of the array of #define DT_PREINIT_ARRAYSZ 33
pre-initialization functions. */
#define DT_LOOS 0x6000000d /* First OS-specific */ #define DT_LOOS 0x6000000d /* First OS-specific */
#define DT_HIOS 0x6ffff000 /* Last OS-specific */ #define DT_HIOS 0x6ffff000 /* Last OS-specific */
#define DT_LOPROC 0x70000000 /* First processor-specific type. */ #define DT_LOPROC 0x70000000 /* First processor-specific type. */
...@@ -319,19 +318,19 @@ typedef struct { ...@@ -319,19 +318,19 @@ typedef struct {
#define DT_VERSYM 0x6ffffff0 #define DT_VERSYM 0x6ffffff0
/* Values for DT_FLAGS */ /* Values for DT_FLAGS */
#define DF_ORIGIN 0x0001 /* Indicates that the object being loaded may /* Indicates that the object being loaded may make reference to
make reference to the $ORIGIN substitution the $ORIGIN substitution string */
string */ #define DF_ORIGIN 0x0001
#define DF_SYMBOLIC 0x0002 /* Indicates "symbolic" linking. */ #define DF_SYMBOLIC 0x0002 /* Indicates "symbolic" linking. */
#define DF_TEXTREL 0x0004 /* Indicates there may be relocations in /* Indicates there may be relocations in non-writable segments. */
non-writable segments. */ #define DF_TEXTREL 0x0004
#define DF_BIND_NOW 0x0008 /* Indicates that the dynamic linker should /* Indicates that the dynamic linker should process all
process all relocations for the object relocations for the object containing this entry before
containing this entry before transferring transferring control to the program. */
control to the program. */ #define DF_BIND_NOW 0x0008
#define DF_STATIC_TLS 0x0010 /* Indicates that the shared object or /* Indicates that the shared object or executable contains code
executable contains code using a static using a static thread-local storage scheme. */
thread-local storage scheme. */ #define DF_STATIC_TLS 0x0010
/* Values for n_type. Used in core files. */ /* Values for n_type. Used in core files. */
#define NT_PRSTATUS 1 /* Process status. */ #define NT_PRSTATUS 1 /* Process status. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment