Print this page
10366 ld(1) should support GNU-style linker sets
10581 ld(1) should know kernel modules are a thing


 177 #define SGS_REJ_NONE            0
 178 #define SGS_REJ_MACH            1       /* wrong ELF machine type */
 179 #define SGS_REJ_CLASS           2       /* wrong ELF class (32-bit/64-bit) */
 180 #define SGS_REJ_DATA            3       /* wrong ELF data format (MSG/LSB) */
 181 #define SGS_REJ_TYPE            4       /* bad ELF type */
 182 #define SGS_REJ_BADFLAG         5       /* bad ELF flags value */
 183 #define SGS_REJ_MISFLAG         6       /* mismatched ELF flags value */
 184 #define SGS_REJ_VERSION         7       /* mismatched ELF/lib version */
 185 #define SGS_REJ_HAL             8       /* HAL R1 extensions required */
 186 #define SGS_REJ_US3             9       /* Sun UltraSPARC III extensions */
 187                                         /*      required */
 188 #define SGS_REJ_STR             10      /* generic error - info is a string */
 189 #define SGS_REJ_UNKFILE         11      /* unknown file type */
 190 #define SGS_REJ_UNKCAP          12      /* unknown capabilities */
 191 #define SGS_REJ_HWCAP_1         13      /* hardware capabilities mismatch */
 192 #define SGS_REJ_SFCAP_1         14      /* software capabilities mismatch */
 193 #define SGS_REJ_MACHCAP         15      /* machine capability mismatch */
 194 #define SGS_REJ_PLATCAP         16      /* platform capability mismatch */
 195 #define SGS_REJ_HWCAP_2         17      /* hardware capabilities mismatch */
 196 #define SGS_REJ_ARCHIVE         18      /* archive used in invalid context */
 197 #define SGS_REJ_NUM             19

 198 
 199 #define FLG_REJ_ALTER           0x01    /* object name is an alternative */
 200 
 201 /*
 202  * For those source files used both inside and outside of the
 203  * libld source base (tools/common/string_table.c) we can
 204  * automatically switch between the allocation models
 205  * based off of the 'cc -DUSE_LIBLD_MALLOC' flag.
 206  */
 207 #ifdef  USE_LIBLD_MALLOC
 208 #define calloc(x, a)            libld_malloc(((size_t)x) * ((size_t)a))
 209 #define free                    libld_free
 210 #define malloc                  libld_malloc
 211 #define realloc                 libld_realloc
 212 
 213 #define libld_calloc(x, a)      libld_malloc(((size_t)x) * ((size_t)a))
 214 extern void                     libld_free(void *);
 215 extern void                     *libld_malloc(size_t);
 216 extern void                     *libld_realloc(void *, size_t);
 217 #endif




 177 #define SGS_REJ_NONE            0
 178 #define SGS_REJ_MACH            1       /* wrong ELF machine type */
 179 #define SGS_REJ_CLASS           2       /* wrong ELF class (32-bit/64-bit) */
 180 #define SGS_REJ_DATA            3       /* wrong ELF data format (MSG/LSB) */
 181 #define SGS_REJ_TYPE            4       /* bad ELF type */
 182 #define SGS_REJ_BADFLAG         5       /* bad ELF flags value */
 183 #define SGS_REJ_MISFLAG         6       /* mismatched ELF flags value */
 184 #define SGS_REJ_VERSION         7       /* mismatched ELF/lib version */
 185 #define SGS_REJ_HAL             8       /* HAL R1 extensions required */
 186 #define SGS_REJ_US3             9       /* Sun UltraSPARC III extensions */
 187                                         /*      required */
 188 #define SGS_REJ_STR             10      /* generic error - info is a string */
 189 #define SGS_REJ_UNKFILE         11      /* unknown file type */
 190 #define SGS_REJ_UNKCAP          12      /* unknown capabilities */
 191 #define SGS_REJ_HWCAP_1         13      /* hardware capabilities mismatch */
 192 #define SGS_REJ_SFCAP_1         14      /* software capabilities mismatch */
 193 #define SGS_REJ_MACHCAP         15      /* machine capability mismatch */
 194 #define SGS_REJ_PLATCAP         16      /* platform capability mismatch */
 195 #define SGS_REJ_HWCAP_2         17      /* hardware capabilities mismatch */
 196 #define SGS_REJ_ARCHIVE         18      /* archive used in invalid context */
 197 #define SGS_REJ_KMOD            19      /* object is a kernel module */
 198 #define SGS_REJ_NUM             20
 199 
 200 #define FLG_REJ_ALTER           0x01    /* object name is an alternative */
 201 
 202 /*
 203  * For those source files used both inside and outside of the
 204  * libld source base (tools/common/string_table.c) we can
 205  * automatically switch between the allocation models
 206  * based off of the 'cc -DUSE_LIBLD_MALLOC' flag.
 207  */
 208 #ifdef  USE_LIBLD_MALLOC
 209 #define calloc(x, a)            libld_malloc(((size_t)x) * ((size_t)a))
 210 #define free                    libld_free
 211 #define malloc                  libld_malloc
 212 #define realloc                 libld_realloc
 213 
 214 #define libld_calloc(x, a)      libld_malloc(((size_t)x) * ((size_t)a))
 215 extern void                     libld_free(void *);
 216 extern void                     *libld_malloc(size_t);
 217 extern void                     *libld_realloc(void *, size_t);
 218 #endif