1 |
/* `a.out' object-file definitions, including extensions to 64-bit fields |
/* `a.out' object-file definitions, including extensions to 64-bit fields |
2 |
|
|
3 |
Copyright 2001 Free Software Foundation, Inc. |
Copyright 1999, 2000, 2001, 2003 Free Software Foundation, Inc. |
4 |
|
|
5 |
This program is free software; you can redistribute it and/or modify |
This program is free software; you can redistribute it and/or modify |
6 |
it under the terms of the GNU General Public License as published by |
it under the terms of the GNU General Public License as published by |
19 |
#ifndef __A_OUT_64_H__ |
#ifndef __A_OUT_64_H__ |
20 |
#define __A_OUT_64_H__ |
#define __A_OUT_64_H__ |
21 |
|
|
22 |
/* This is the layout on disk of the 32-bit or 64-bit exec header. */ |
#ifndef BYTES_IN_WORD |
23 |
|
#define BYTES_IN_WORD 4 |
24 |
|
#endif |
25 |
|
|
26 |
|
/* This is the layout on disk of the 32-bit or 64-bit exec header. */ |
27 |
|
|
28 |
#ifndef external_exec |
#ifndef external_exec |
29 |
struct external_exec |
struct external_exec |
30 |
{ |
{ |
31 |
bfd_byte e_info[4]; /* magic number and stuff */ |
bfd_byte e_info[4]; /* Magic number and stuff. */ |
32 |
bfd_byte e_text[BYTES_IN_WORD]; /* length of text section in bytes */ |
bfd_byte e_text[BYTES_IN_WORD]; /* Length of text section in bytes. */ |
33 |
bfd_byte e_data[BYTES_IN_WORD]; /* length of data section in bytes */ |
bfd_byte e_data[BYTES_IN_WORD]; /* Length of data section in bytes. */ |
34 |
bfd_byte e_bss[BYTES_IN_WORD]; /* length of bss area in bytes */ |
bfd_byte e_bss[BYTES_IN_WORD]; /* Length of bss area in bytes. */ |
35 |
bfd_byte e_syms[BYTES_IN_WORD]; /* length of symbol table in bytes */ |
bfd_byte e_syms[BYTES_IN_WORD]; /* Length of symbol table in bytes. */ |
36 |
bfd_byte e_entry[BYTES_IN_WORD]; /* start address */ |
bfd_byte e_entry[BYTES_IN_WORD]; /* Start address. */ |
37 |
bfd_byte e_trsize[BYTES_IN_WORD]; /* length of text relocation info */ |
bfd_byte e_trsize[BYTES_IN_WORD]; /* Length of text relocation info. */ |
38 |
bfd_byte e_drsize[BYTES_IN_WORD]; /* length of data relocation info */ |
bfd_byte e_drsize[BYTES_IN_WORD]; /* Length of data relocation info. */ |
39 |
}; |
}; |
40 |
|
|
41 |
#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7) |
#define EXEC_BYTES_SIZE (4 + BYTES_IN_WORD * 7) |
42 |
|
|
43 |
/* Magic numbers for a.out files */ |
/* Magic numbers for a.out files. */ |
44 |
|
|
45 |
#if ARCH_SIZE==64 |
#if ARCH_SIZE==64 |
46 |
#define OMAGIC 0x1001 /* Code indicating object file */ |
#define OMAGIC 0x1001 /* Code indicating object file. */ |
47 |
#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */ |
#define ZMAGIC 0x1002 /* Code indicating demand-paged executable. */ |
48 |
#define NMAGIC 0x1003 /* Code indicating pure executable. */ |
#define NMAGIC 0x1003 /* Code indicating pure executable. */ |
49 |
|
|
53 |
&& N_MAGIC(x) != NMAGIC \ |
&& N_MAGIC(x) != NMAGIC \ |
54 |
&& N_MAGIC(x) != ZMAGIC) |
&& N_MAGIC(x) != ZMAGIC) |
55 |
#else |
#else |
56 |
#define OMAGIC 0407 /* ...object file or impure executable. */ |
#define OMAGIC 0407 /* Object file or impure executable. */ |
57 |
#define NMAGIC 0410 /* Code indicating pure executable. */ |
#define NMAGIC 0410 /* Code indicating pure executable. */ |
58 |
#define ZMAGIC 0413 /* Code indicating demand-paged executable. */ |
#define ZMAGIC 0413 /* Code indicating demand-paged executable. */ |
59 |
#define BMAGIC 0415 /* Used by a b.out object. */ |
#define BMAGIC 0415 /* Used by a b.out object. */ |
129 |
|
|
130 |
* QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true, |
* QMAGIC is always like a ZMAGIC for which N_HEADER_IN_TEXT is true, |
131 |
and for which the starting address is TARGET_PAGE_SIZE (or should this be |
and for which the starting address is TARGET_PAGE_SIZE (or should this be |
132 |
SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC). |
SEGMENT_SIZE?) (TEXT_START_ADDR only applies to ZMAGIC, not to QMAGIC). */ |
|
*/ |
|
133 |
|
|
134 |
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header |
/* This macro is only relevant for ZMAGIC files; QMAGIC always has the header |
135 |
in the text. */ |
in the text. */ |
155 |
|
|
156 |
#ifndef N_TXTADDR |
#ifndef N_TXTADDR |
157 |
#define N_TXTADDR(x) \ |
#define N_TXTADDR(x) \ |
158 |
(/* The address of a QMAGIC file is always one page in, */ \ |
(/* The address of a QMAGIC file is always one page in, \ |
159 |
/* with the header in the text. */ \ |
with the header in the text. */ \ |
160 |
N_IS_QMAGIC (x) \ |
N_IS_QMAGIC (x) \ |
161 |
? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \ |
? (bfd_vma) TARGET_PAGE_SIZE + EXEC_BYTES_SIZE \ |
162 |
: (N_MAGIC (x) != ZMAGIC \ |
: (N_MAGIC (x) != ZMAGIC \ |
163 |
? (bfd_vma) 0 /* object file or NMAGIC */ \ |
? (bfd_vma) 0 /* Object file or NMAGIC. */ \ |
164 |
: (N_SHARED_LIB (x) \ |
: (N_SHARED_LIB (x) \ |
165 |
? (bfd_vma) 0 \ |
? (bfd_vma) 0 \ |
166 |
: (N_HEADER_IN_TEXT (x) \ |
: (N_HEADER_IN_TEXT (x) \ |
190 |
: (N_SHARED_LIB (x) \ |
: (N_SHARED_LIB (x) \ |
191 |
? 0 \ |
? 0 \ |
192 |
: (N_HEADER_IN_TEXT (x) \ |
: (N_HEADER_IN_TEXT (x) \ |
193 |
? EXEC_BYTES_SIZE /* no padding */ \ |
? EXEC_BYTES_SIZE /* No padding. */ \ |
194 |
: ZMAGIC_DISK_BLOCK_SIZE /* a page of padding */))) |
: ZMAGIC_DISK_BLOCK_SIZE /* A page of padding. */))) |
195 |
#endif |
#endif |
196 |
/* Size of the text section. It's always as stated, except that we |
/* Size of the text section. It's always as stated, except that we |
197 |
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF |
offset it to `undo' the adjustment to N_TXTADDR and N_TXTOFF |
206 |
: ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \ |
: ((N_MAGIC (x) != ZMAGIC || N_SHARED_LIB (x)) \ |
207 |
? (x).a_text \ |
? (x).a_text \ |
208 |
: (N_HEADER_IN_TEXT (x) \ |
: (N_HEADER_IN_TEXT (x) \ |
209 |
? (x).a_text - EXEC_BYTES_SIZE /* no padding */ \ |
? (x).a_text - EXEC_BYTES_SIZE /* No padding. */ \ |
210 |
: (x).a_text /* a page of padding */ ))) |
: (x).a_text /* A page of padding. */ ))) |
211 |
#endif |
#endif |
212 |
/* The address of the data segment in virtual memory. |
/* The address of the data segment in virtual memory. |
213 |
It is the text segment address, plus text segment size, rounded |
It is the text segment address, plus text segment size, rounded |
214 |
up to a N_SEGSIZE boundary for pure or pageable files. */ |
up to a N_SEGSIZE boundary for pure or pageable files. */ |
215 |
#ifndef N_DATADDR |
#ifndef N_DATADDR |
216 |
#define N_DATADDR(x) \ |
#define N_DATADDR(x) \ |
217 |
(N_MAGIC (x) == OMAGIC \ |
(N_MAGIC (x) == OMAGIC \ |
238 |
for NMAGIC. */ |
for NMAGIC. */ |
239 |
|
|
240 |
#ifndef N_DATOFF |
#ifndef N_DATOFF |
241 |
#define N_DATOFF(x) ( N_TXTOFF (x) + N_TXTSIZE (x) ) |
#define N_DATOFF(x) (N_TXTOFF (x) + N_TXTSIZE (x)) |
242 |
#endif |
#endif |
243 |
#ifndef N_TRELOFF |
#ifndef N_TRELOFF |
244 |
#define N_TRELOFF(x) ( N_DATOFF (x) + (x).a_data ) |
#define N_TRELOFF(x) (N_DATOFF (x) + (x).a_data) |
245 |
#endif |
#endif |
246 |
#ifndef N_DRELOFF |
#ifndef N_DRELOFF |
247 |
#define N_DRELOFF(x) ( N_TRELOFF (x) + (x).a_trsize ) |
#define N_DRELOFF(x) (N_TRELOFF (x) + (x).a_trsize) |
248 |
#endif |
#endif |
249 |
#ifndef N_SYMOFF |
#ifndef N_SYMOFF |
250 |
#define N_SYMOFF(x) ( N_DRELOFF (x) + (x).a_drsize ) |
#define N_SYMOFF(x) (N_DRELOFF (x) + (x).a_drsize) |
251 |
#endif |
#endif |
252 |
#ifndef N_STROFF |
#ifndef N_STROFF |
253 |
#define N_STROFF(x) ( N_SYMOFF (x) + (x).a_syms ) |
#define N_STROFF(x) (N_SYMOFF (x) + (x).a_syms) |
254 |
#endif |
#endif |
255 |
|
|
256 |
/* Symbols */ |
/* Symbols */ |
257 |
#ifndef external_nlist |
#ifndef external_nlist |
258 |
struct external_nlist { |
struct external_nlist |
259 |
bfd_byte e_strx[BYTES_IN_WORD]; /* index into string table of name */ |
{ |
260 |
bfd_byte e_type[1]; /* type of symbol */ |
bfd_byte e_strx[BYTES_IN_WORD]; /* Index into string table of name. */ |
261 |
bfd_byte e_other[1]; /* misc info (usually empty) */ |
bfd_byte e_type[1]; /* Type of symbol. */ |
262 |
bfd_byte e_desc[2]; /* description field */ |
bfd_byte e_other[1]; /* Misc info (usually empty). */ |
263 |
bfd_byte e_value[BYTES_IN_WORD]; /* value of symbol */ |
bfd_byte e_desc[2]; /* Description field. */ |
264 |
|
bfd_byte e_value[BYTES_IN_WORD]; /* Value of symbol. */ |
265 |
}; |
}; |
266 |
#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD) |
#define EXTERNAL_NLIST_SIZE (BYTES_IN_WORD+4+BYTES_IN_WORD) |
267 |
#endif |
#endif |
268 |
|
|
269 |
struct internal_nlist { |
struct internal_nlist |
270 |
unsigned long n_strx; /* index into string table of name */ |
{ |
271 |
unsigned char n_type; /* type of symbol */ |
unsigned long n_strx; /* Index into string table of name. */ |
272 |
unsigned char n_other; /* misc info (usually empty) */ |
unsigned char n_type; /* Type of symbol. */ |
273 |
unsigned short n_desc; /* description field */ |
unsigned char n_other; /* Misc info (usually empty). */ |
274 |
bfd_vma n_value; /* value of symbol */ |
unsigned short n_desc; /* Description field. */ |
275 |
|
bfd_vma n_value; /* Value of symbol. */ |
276 |
}; |
}; |
277 |
|
|
278 |
/* The n_type field is the symbol type, containing: */ |
/* The n_type field is the symbol type, containing: */ |
279 |
|
|
280 |
#define N_UNDF 0 /* Undefined symbol */ |
#define N_UNDF 0 /* Undefined symbol. */ |
281 |
#define N_ABS 2 /* Absolute symbol -- defined at particular addr */ |
#define N_ABS 2 /* Absolute symbol -- defined at particular addr. */ |
282 |
#define N_TEXT 4 /* Text sym -- defined at offset in text seg */ |
#define N_TEXT 4 /* Text sym -- defined at offset in text seg. */ |
283 |
#define N_DATA 6 /* Data sym -- defined at offset in data seg */ |
#define N_DATA 6 /* Data sym -- defined at offset in data seg. */ |
284 |
#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg */ |
#define N_BSS 8 /* BSS sym -- defined at offset in zero'd seg. */ |
285 |
#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink) */ |
#define N_COMM 0x12 /* Common symbol (visible after shared lib dynlink). */ |
286 |
#define N_FN 0x1f /* File name of .o file */ |
#define N_FN 0x1f /* File name of .o file. */ |
287 |
#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh) */ |
#define N_FN_SEQ 0x0C /* N_FN from Sequent compilers (sigh). */ |
288 |
/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT, |
/* Note: N_EXT can only be usefully OR-ed with N_UNDF, N_ABS, N_TEXT, |
289 |
N_DATA, or N_BSS. When the low-order bit of other types is set, |
N_DATA, or N_BSS. When the low-order bit of other types is set, |
290 |
(e.g. N_WARNING versus N_FN), they are two different types. */ |
(e.g. N_WARNING versus N_FN), they are two different types. */ |
291 |
#define N_EXT 1 /* External symbol (as opposed to local-to-this-file) */ |
#define N_EXT 1 /* External symbol (as opposed to local-to-this-file). */ |
292 |
#define N_TYPE 0x1e |
#define N_TYPE 0x1e |
293 |
#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol */ |
#define N_STAB 0xe0 /* If any of these bits are on, it's a debug symbol. */ |
294 |
|
|
295 |
#define N_INDR 0x0a |
#define N_INDR 0x0a |
296 |
|
|
306 |
in that it can satisfy undefined external references. */ |
in that it can satisfy undefined external references. */ |
307 |
|
|
308 |
/* These appear as input to LD, in a .o file. */ |
/* These appear as input to LD, in a .o file. */ |
309 |
#define N_SETA 0x14 /* Absolute set element symbol */ |
#define N_SETA 0x14 /* Absolute set element symbol. */ |
310 |
#define N_SETT 0x16 /* Text set element symbol */ |
#define N_SETT 0x16 /* Text set element symbol. */ |
311 |
#define N_SETD 0x18 /* Data set element symbol */ |
#define N_SETD 0x18 /* Data set element symbol. */ |
312 |
#define N_SETB 0x1A /* Bss set element symbol */ |
#define N_SETB 0x1A /* Bss set element symbol. */ |
313 |
|
|
314 |
/* This is output from LD. */ |
/* This is output from LD. */ |
315 |
#define N_SETV 0x1C /* Pointer to set vector in data area. */ |
#define N_SETV 0x1C /* Pointer to set vector in data area. */ |
340 |
instructions. Eg, on the 68k, each move instruction can reference |
instructions. Eg, on the 68k, each move instruction can reference |
341 |
the target with a displacement of 16 or 32 bits. On the sparc, move |
the target with a displacement of 16 or 32 bits. On the sparc, move |
342 |
instructions use an offset of 14 bits, so the offset is stored in |
instructions use an offset of 14 bits, so the offset is stored in |
343 |
the reloc field, and the data in the section is ignored. |
the reloc field, and the data in the section is ignored. */ |
|
*/ |
|
344 |
|
|
345 |
/* This structure describes a single relocation to be performed. |
/* This structure describes a single relocation to be performed. |
346 |
The text-relocation section of the file is a vector of these structures, |
The text-relocation section of the file is a vector of these structures, |
347 |
all of which apply to the text section. |
all of which apply to the text section. |
348 |
Likewise, the data-relocation section applies to the data section. */ |
Likewise, the data-relocation section applies to the data section. */ |
349 |
|
|
350 |
struct reloc_std_external { |
struct reloc_std_external |
351 |
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */ |
{ |
352 |
bfd_byte r_index[3]; /* symbol table index of symbol */ |
bfd_byte r_address[BYTES_IN_WORD]; /* Offset of of data to relocate. */ |
353 |
bfd_byte r_type[1]; /* relocation type */ |
bfd_byte r_index[3]; /* Symbol table index of symbol. */ |
354 |
|
bfd_byte r_type[1]; /* Relocation type. */ |
355 |
}; |
}; |
356 |
|
|
357 |
#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80) |
#define RELOC_STD_BITS_PCREL_BIG ((unsigned int) 0x80) |
374 |
#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02) |
#define RELOC_STD_BITS_RELATIVE_BIG ((unsigned int) 0x02) |
375 |
#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40) |
#define RELOC_STD_BITS_RELATIVE_LITTLE ((unsigned int) 0x40) |
376 |
|
|
377 |
#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry */ |
#define RELOC_STD_SIZE (BYTES_IN_WORD + 3 + 1) /* Bytes per relocation entry. */ |
378 |
|
|
379 |
struct reloc_std_internal |
struct reloc_std_internal |
380 |
{ |
{ |
397 |
unsigned int r_extern:1; |
unsigned int r_extern:1; |
398 |
/* The next three bits are for SunOS shared libraries, and seem to |
/* The next three bits are for SunOS shared libraries, and seem to |
399 |
be undocumented. */ |
be undocumented. */ |
400 |
unsigned int r_baserel:1; /* Linkage table relative */ |
unsigned int r_baserel:1; /* Linkage table relative. */ |
401 |
unsigned int r_jmptable:1; /* pc-relative to jump table */ |
unsigned int r_jmptable:1; /* pc-relative to jump table. */ |
402 |
unsigned int r_relative:1; /* "relative relocation" */ |
unsigned int r_relative:1; /* "relative relocation". */ |
403 |
/* unused */ |
/* unused */ |
404 |
unsigned int r_pad:1; /* Padding -- set to zero */ |
unsigned int r_pad:1; /* Padding -- set to zero. */ |
405 |
}; |
}; |
406 |
|
|
407 |
|
|
408 |
/* EXTENDED RELOCS */ |
/* EXTENDED RELOCS. */ |
409 |
|
|
410 |
struct reloc_ext_external { |
struct reloc_ext_external |
411 |
bfd_byte r_address[BYTES_IN_WORD]; /* offset of of data to relocate */ |
{ |
412 |
bfd_byte r_index[3]; /* symbol table index of symbol */ |
bfd_byte r_address[BYTES_IN_WORD]; /* Offset of of data to relocate. */ |
413 |
bfd_byte r_type[1]; /* relocation type */ |
bfd_byte r_index[3]; /* Symbol table index of symbol. */ |
414 |
bfd_byte r_addend[BYTES_IN_WORD]; /* datum addend */ |
bfd_byte r_type[1]; /* Relocation type. */ |
415 |
|
bfd_byte r_addend[BYTES_IN_WORD]; /* Datum addend. */ |
416 |
}; |
}; |
417 |
|
|
418 |
#ifndef RELOC_EXT_BITS_EXTERN_BIG |
#ifndef RELOC_EXT_BITS_EXTERN_BIG |
439 |
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3 |
#define RELOC_EXT_BITS_TYPE_SH_LITTLE 3 |
440 |
#endif |
#endif |
441 |
|
|
442 |
/* Bytes per relocation entry */ |
/* Bytes per relocation entry. */ |
443 |
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD) |
#define RELOC_EXT_SIZE (BYTES_IN_WORD + 3 + 1 + BYTES_IN_WORD) |
444 |
|
|
445 |
enum reloc_type |
enum reloc_type |
446 |
{ |
{ |
447 |
/* simple relocations */ |
/* Simple relocations. */ |
448 |
RELOC_8, /* data[0:7] = addend + sv */ |
RELOC_8, /* data[0:7] = addend + sv */ |
449 |
RELOC_16, /* data[0:15] = addend + sv */ |
RELOC_16, /* data[0:15] = addend + sv */ |
450 |
RELOC_32, /* data[0:31] = addend + sv */ |
RELOC_32, /* data[0:31] = addend + sv */ |
451 |
/* pc-rel displacement */ |
/* PC-rel displacement. */ |
452 |
RELOC_DISP8, /* data[0:7] = addend - pc + sv */ |
RELOC_DISP8, /* data[0:7] = addend - pc + sv */ |
453 |
RELOC_DISP16, /* data[0:15] = addend - pc + sv */ |
RELOC_DISP16, /* data[0:15] = addend - pc + sv */ |
454 |
RELOC_DISP32, /* data[0:31] = addend - pc + sv */ |
RELOC_DISP32, /* data[0:31] = addend - pc + sv */ |
455 |
/* Special */ |
/* Special. */ |
456 |
RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */ |
RELOC_WDISP30, /* data[0:29] = (addend + sv - pc)>>2 */ |
457 |
RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */ |
RELOC_WDISP22, /* data[0:21] = (addend + sv - pc)>>2 */ |
458 |
RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */ |
RELOC_HI22, /* data[0:21] = (addend + sv)>>10 */ |
461 |
RELOC_LO10, /* data[0:9] = (addend + sv) */ |
RELOC_LO10, /* data[0:9] = (addend + sv) */ |
462 |
RELOC_SFA_BASE, |
RELOC_SFA_BASE, |
463 |
RELOC_SFA_OFF13, |
RELOC_SFA_OFF13, |
464 |
/* P.I.C. (base-relative) */ |
/* P.I.C. (base-relative). */ |
465 |
RELOC_BASE10, /* Not sure - maybe we can do this the */ |
RELOC_BASE10, /* Not sure - maybe we can do this the */ |
466 |
RELOC_BASE13, /* right way now */ |
RELOC_BASE13, /* right way now */ |
467 |
RELOC_BASE22, |
RELOC_BASE22, |
468 |
/* for some sort of pc-rel P.I.C. (?) */ |
/* For some sort of pc-rel P.I.C. (?) */ |
469 |
RELOC_PC10, |
RELOC_PC10, |
470 |
RELOC_PC22, |
RELOC_PC22, |
471 |
/* P.I.C. jump table */ |
/* P.I.C. jump table. */ |
472 |
RELOC_JMP_TBL, |
RELOC_JMP_TBL, |
473 |
/* reputedly for shared libraries somehow */ |
/* Reputedly for shared libraries somehow. */ |
474 |
RELOC_SEGOFF16, |
RELOC_SEGOFF16, |
475 |
RELOC_GLOB_DAT, |
RELOC_GLOB_DAT, |
476 |
RELOC_JMP_SLOT, |
RELOC_JMP_SLOT, |
482 |
RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */ |
RELOC_HHI22, /* data[0:21] = (addend + sv) >> 42 */ |
483 |
RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */ |
RELOC_HLO10, /* data[0:9] = (addend + sv) >> 32 */ |
484 |
|
|
485 |
/* 29K relocation types */ |
/* 29K relocation types. */ |
486 |
RELOC_JUMPTARG, |
RELOC_JUMPTARG, |
487 |
RELOC_CONST, |
RELOC_CONST, |
488 |
RELOC_CONSTH, |
RELOC_CONSTH, |
489 |
|
|
490 |
/* All the new ones I can think of, for sparc v9 */ |
/* All the new ones I can think of, for sparc v9. */ |
|
|
|
491 |
RELOC_64, /* data[0:63] = addend + sv */ |
RELOC_64, /* data[0:63] = addend + sv */ |
492 |
RELOC_DISP64, /* data[0:63] = addend - pc + sv */ |
RELOC_DISP64, /* data[0:63] = addend - pc + sv */ |
493 |
RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */ |
RELOC_WDISP21, /* data[0:20] = (addend + sv - pc)>>2 */ |
497 |
What are the other ones, |
What are the other ones, |
498 |
Since this is a clean slate, can we throw away the ones we dont |
Since this is a clean slate, can we throw away the ones we dont |
499 |
understand ? Should we sort the values ? What about using a |
understand ? Should we sort the values ? What about using a |
500 |
microcode format like the 68k ? |
microcode format like the 68k ? */ |
|
*/ |
|
501 |
NO_RELOC |
NO_RELOC |
502 |
}; |
}; |
503 |
|
|
504 |
|
|
505 |
struct reloc_internal { |
struct reloc_internal |
506 |
bfd_vma r_address; /* offset of of data to relocate */ |
{ |
507 |
long r_index; /* symbol table index of symbol */ |
bfd_vma r_address; /* Offset of of data to relocate. */ |
508 |
enum reloc_type r_type; /* relocation type */ |
long r_index; /* Symbol table index of symbol. */ |
509 |
bfd_vma r_addend; /* datum addend */ |
enum reloc_type r_type; /* Relocation type. */ |
510 |
|
bfd_vma r_addend; /* Datum addend. */ |
511 |
}; |
}; |
512 |
|
|
513 |
/* Q. |
/* Q. |
514 |
Should the length of the string table be 4 bytes or 8 bytes ? |
Should the length of the string table be 4 bytes or 8 bytes ? |
515 |
|
|
516 |
Q. |
Q. |
517 |
What about archive indexes ? |
What about archive indexes ? */ |
|
|
|
|
*/ |
|
518 |
|
|
519 |
#endif /* __A_OUT_64_H__ */ |
#endif /* __A_OUT_64_H__ */ |