source: rtems/cpukit/score/cpu/arm/include/machine/elf_machdep.h @ 2afb22b

5
Last change on this file since 2afb22b was 2afb22b, checked in by Chris Johns <chrisj@…>, on 12/23/17 at 07:18:56

Remove make preinstall

A speciality of the RTEMS build system was the make preinstall step. It
copied header files from arbitrary locations into the build tree. The
header files were included via the -Bsome/build/tree/path GCC command
line option.

This has at least seven problems:

  • The make preinstall step itself needs time and disk space.
  • Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error.
  • There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult.
  • The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit.
  • An introduction of a new build system is difficult.
  • Include paths specified by the -B option are system headers. This may suppress warnings.
  • The parallel build had sporadic failures on some hosts.

This patch removes the make preinstall step. All installed header
files are moved to dedicated include directories in the source tree.
Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc,
etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g.
erc32, imx, qoriq, etc.

The new cpukit include directories are:

  • cpukit/include
  • cpukit/score/cpu/@RTEMS_CPU@/include
  • cpukit/libnetworking

The new BSP include directories are:

  • bsps/include
  • bsps/@RTEMS_CPU@/include
  • bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include

There are build tree include directories for generated files.

The include directory order favours the most general header file, e.g.
it is not possible to override general header files via the include path
order.

The "bootstrap -p" option was removed. The new "bootstrap -H" option
should be used to regenerate the "headers.am" files.

Update #3254.

  • Property mode set to 100644
File size: 3.8 KB
Line 
1/*      $NetBSD: elf_machdep.h,v 1.8 2009/05/30 05:56:52 skrll Exp $    */
2
3#if defined(__ARMEB__)
4#define ELF32_MACHDEP_ENDIANNESS        ELFDATA2MSB
5#else
6#define ELF32_MACHDEP_ENDIANNESS        ELFDATA2LSB
7#endif
8
9#define ELF64_MACHDEP_ENDIANNESS        XXX     /* break compilation */
10#define ELF64_MACHDEP_ID_CASES                                          \
11                /* no 64-bit ELF machine types supported */
12
13/* Processor specific flags for the ELF header e_flags field.  */
14#define EF_ARM_RELEXEC          0x00000001
15#define EF_ARM_HASENTRY         0x00000002
16#define EF_ARM_INTERWORK        0x00000004 /* GNU binutils 000413 */
17#define EF_ARM_SYMSARESORTED    0x00000004 /* ARM ELF A08 */
18#define EF_ARM_APCS_26          0x00000008 /* GNU binutils 000413 */
19#define EF_ARM_DYNSYMSUSESEGIDX 0x00000008 /* ARM ELF B01 */
20#define EF_ARM_APCS_FLOAT       0x00000010 /* GNU binutils 000413 */
21#define EF_ARM_MAPSYMSFIRST     0x00000010 /* ARM ELF B01 */
22#define EF_ARM_PIC              0x00000020
23#define EF_ARM_ALIGN8           0x00000040 /* 8-bit structure alignment.  */
24#define EF_ARM_NEW_ABI          0x00000080
25#define EF_ARM_OLD_ABI          0x00000100
26#define EF_ARM_SOFT_FLOAT       0x00000200
27#define EF_ARM_EABIMASK         0xff000000
28
29#define ELF32_MACHDEP_ID_CASES                                          \
30                case EM_ARM:                                            \
31                        break;
32
33#define ELF32_MACHDEP_ID        EM_ARM
34
35#define ARCH_ELFSIZE            32      /* MD native binary size */
36
37/* Processor specific relocation types */
38
39#define R_ARM_NONE              0
40#define R_ARM_PC24              1
41#define R_ARM_ABS32             2
42#define R_ARM_REL32             3
43#define R_ARM_PC13              4
44#define R_ARM_ABS16             5
45#define R_ARM_ABS12             6
46#define R_ARM_THM_ABS5          7
47#define R_ARM_ABS8              8
48#define R_ARM_SBREL32           9
49#define R_ARM_THM_CALL  10
50#define R_ARM_THM_PC8           11
51#define R_ARM_AMP_VCALL9        12
52#define R_ARM_SWI24             13
53#define R_ARM_THM_SWI8          14
54#define R_ARM_XPC25             15
55#define R_ARM_THM_XPC22         16
56
57/* TLS relocations */
58#define R_ARM_TLS_DTPMOD32      17      /* ID of module containing symbol */
59#define R_ARM_TLS_DTPOFF32      18      /* Offset in TLS block */
60#define R_ARM_TLS_TPOFF32       19      /* Offset in static TLS block */
61
62/* 20-31 are reserved for ARM Linux. */
63#define R_ARM_COPY              20
64#define R_ARM_GLOB_DAT          21
65#define R_ARM_JUMP_SLOT         22
66#define R_ARM_RELATIVE          23
67#define R_ARM_GOTOFF            24
68#define R_ARM_GOTPC             25
69#define R_ARM_GOT32             26
70#define R_ARM_PLT32             27
71#define R_ARM_CALL        28
72#define R_ARM_JUMP24      29
73#define R_ARM_THM_JUMP24        30
74#define R_ARM_BASE_ABS          31
75
76#define R_ARM_ALU_PCREL_7_0     32
77#define R_ARM_ALU_PCREL_15_8    33
78#define R_ARM_ALU_PCREL_23_15   34
79#define R_ARM_ALU_SBREL_11_0    35
80#define R_ARM_ALU_SBREL_19_12   36
81#define R_ARM_ALU_SBREL_27_20   37
82#define R_ARM_V4BX        40
83#define R_ARM_TARGET2     41
84#define R_ARM_PREL31      42
85
86#define R_ARM_MOVW_ABS_NC     43
87#define R_ARM_MOVT_ABS        44
88
89#define R_ARM_THM_MOVW_ABS_NC 47
90#define R_ARM_THM_MOVT_ABS    48
91
92#define R_ARM_THM_JUMP19      51
93
94/* 96-111 are reserved to G++. */
95#define R_ARM_GNU_VTENTRY       100
96#define R_ARM_GNU_VTINHERIT     101
97#define R_ARM_THM_JUMP11                102
98#define R_ARM_THM_JUMP8         103
99
100/* More TLS relocations */
101#define R_ARM_TLS_GD32          104     /* PC-rel 32 bit for global dynamic */
102#define R_ARM_TLS_LDM32         105     /* PC-rel 32 bit for local dynamic */
103#define R_ARM_TLS_LDO32         106     /* 32 bit offset relative to TLS */
104#define R_ARM_TLS_IE32          107     /* PC-rel 32 bit for GOT entry of */
105#define R_ARM_TLS_LE32          108
106#define R_ARM_TLS_LDO12         109
107#define R_ARM_TLS_LE12          110
108#define R_ARM_TLS_IE12GP        111
109
110/* 112-127 are reserved for private experiments. */
111
112#define R_ARM_RXPC25            249
113#define R_ARM_RSBREL32          250
114#define R_ARM_THM_RPC22         251
115#define R_ARM_RREL32            252
116#define R_ARM_RABS32            253
117#define R_ARM_RPC24             254
118#define R_ARM_RBASE             255
119
120#define R_TYPE(name)            __CONCAT(R_ARM_,name)
121
122/* Processor specific program header flags */
123#define PF_ARM_SB               0x10000000
124#define PF_ARM_PI               0x20000000
125#define PF_ARM_ENTRY            0x80000000
126
127/* Processor specific section header flags */
128#define SHF_ENTRYSECT           0x10000000
129#define SHF_COMDEF              0x80000000
130
131/* Processor specific symbol types */
132#define STT_ARM_TFUNC           STT_LOPROC
Note: See TracBrowser for help on using the repository browser.