Changeset 609 for branches/GNU/src/binutils/bfd/reloc.c
- Timestamp:
- Aug 16, 2003, 6:59:22 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/binutils/bfd/reloc.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r608 r609 1 1 /* BFD support for handling relocation entries. 2 2 Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3 2000, 2001 3 2000, 2001, 2002, 2003 4 4 Free Software Foundation, Inc. 5 5 Written by Cygnus Support. 6 6 7 This file is part of BFD, the Binary File Descriptor library.8 9 This program is free software; you can redistribute it and/or modify10 it under the terms of the GNU General Public License as published by11 the Free Software Foundation; either version 2 of the License, or12 (at your option) any later version.13 14 This program is distributed in the hope that it will be useful,15 but WITHOUT ANY WARRANTY; without even the implied warranty of16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the17 GNU General Public License for more details.18 19 You should have received a copy of the GNU General Public License20 along with this program; if not, write to the Free Software21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */7 This file is part of BFD, the Binary File Descriptor library. 8 9 This program is free software; you can redistribute it and/or modify 10 it under the terms of the GNU General Public License as published by 11 the Free Software Foundation; either version 2 of the License, or 12 (at your option) any later version. 13 14 This program is distributed in the hope that it will be useful, 15 but WITHOUT ANY WARRANTY; without even the implied warranty of 16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to the Free Software 21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ 22 22 23 23 /* … … 66 66 .typedef enum bfd_reloc_status 67 67 .{ 68 . {* No errors detected*}68 . {* No errors detected. *} 69 69 . bfd_reloc_ok, 70 70 . 71 . {* The relocation was performed, but there was an overflow.*}71 . {* The relocation was performed, but there was an overflow. *} 72 72 . bfd_reloc_overflow, 73 73 . 74 . {* The address to relocate was not within the section supplied.*}74 . {* The address to relocate was not within the section supplied. *} 75 75 . bfd_reloc_outofrange, 76 76 . 77 . {* Used by special functions*}77 . {* Used by special functions. *} 78 78 . bfd_reloc_continue, 79 79 . 80 . {* Unsupported relocation size requested.*}80 . {* Unsupported relocation size requested. *} 81 81 . bfd_reloc_notsupported, 82 82 . 83 . {* Unused*}83 . {* Unused. *} 84 84 . bfd_reloc_other, 85 85 . 86 . {* The symbol to relocate against was undefined.*}86 . {* The symbol to relocate against was undefined. *} 87 87 . bfd_reloc_undefined, 88 88 . 89 . 90 . 91 . 92 . 89 . {* The relocation was performed, but may not be ok - presently 90 . generated only when linking i960 coff files with i960 b.out 91 . symbols. If this type is returned, the error_message argument 92 . to bfd_perform_relocation will be set. *} 93 93 . bfd_reloc_dangerous 94 94 . } … … 98 98 .typedef struct reloc_cache_entry 99 99 .{ 100 . {* A pointer into the canonical table of pointers*}100 . {* A pointer into the canonical table of pointers. *} 101 101 . struct symbol_cache_entry **sym_ptr_ptr; 102 102 . 103 . {* offset in section*}103 . {* offset in section. *} 104 104 . bfd_size_type address; 105 105 . 106 . {* addend for relocation value*}106 . {* addend for relocation value. *} 107 107 . bfd_vma addend; 108 108 . 109 . {* Pointer to how to perform the required relocation*}109 . {* Pointer to how to perform the required relocation. *} 110 110 . reloc_howto_type *howto; 111 111 . 112 .} arelent; 113 112 .} 113 .arelent; 114 . 114 115 */ 115 116 … … 251 252 .enum complain_overflow 252 253 .{ 253 . {* Do not complain on overflow.*}254 . {* Do not complain on overflow. *} 254 255 . complain_overflow_dont, 255 256 . 256 . 257 . as signed or unsigned.*}257 . {* Complain if the bitfield overflows, whether it is considered 258 . as signed or unsigned. *} 258 259 . complain_overflow_bitfield, 259 260 . 260 . 261 . number.*}261 . {* Complain if the value overflows when considered as signed 262 . number. *} 262 263 . complain_overflow_signed, 263 264 . 264 . 265 . unsigned number.*}265 . {* Complain if the value overflows when considered as an 266 . unsigned number. *} 266 267 . complain_overflow_unsigned 267 268 .}; … … 277 278 278 279 CODE_FRAGMENT 279 .struct symbol_cache_entry; {* Forward declaration *}280 .struct symbol_cache_entry; {* Forward declaration. *} 280 281 . 281 282 .struct reloc_howto_struct 282 283 .{ 283 . 284 . 285 . 286 . in this field.For example, a PC relative word relocation287 . 288 . what the outside world calls a R_PCRWORD reloc.*}284 . {* The type field has mainly a documentary use - the back end can 285 . do what it wants with it, though normally the back end's 286 . external idea of what a reloc number is stored 287 . in this field. For example, a PC relative word relocation 288 . in a coff environment has the type 023 - because that's 289 . what the outside world calls a R_PCRWORD reloc. *} 289 290 . unsigned int type; 290 291 . 291 . {* The value the final relocation is shifted right by.This drops292 . 292 . {* The value the final relocation is shifted right by. This drops 293 . unwanted data from the relocation. *} 293 294 . unsigned int rightshift; 294 295 . 295 . 296 . 297 . 296 . {* The size of the item to be relocated. This is *not* a 297 . power-of-two measure. To get the number of bytes operated 298 . on by a type of relocation, use bfd_get_reloc_size. *} 298 299 . int size; 299 300 . 300 . 301 . 301 . {* The number of bits in the item to be relocated. This is used 302 . when doing overflow checking. *} 302 303 . unsigned int bitsize; 303 304 . 304 . 305 . data section of the addend.The relocation function will306 . 307 . being relocated.*}308 . b oolean pc_relative;305 . {* Notes that the relocation is relative to the location in the 306 . data section of the addend. The relocation function will 307 . subtract from the relocation value the address of the location 308 . being relocated. *} 309 . bfd_boolean pc_relative; 309 310 . 310 . 311 . The relocated value is left shifted by this amount.*}311 . {* The bit position of the reloc value in the destination. 312 . The relocated value is left shifted by this amount. *} 312 313 . unsigned int bitpos; 313 314 . 314 . 315 . relocating.*}315 . {* What type of overflow error should be checked for when 316 . relocating. *} 316 317 . enum complain_overflow complain_on_overflow; 317 318 . 318 . 319 . called rather than the normal function.This allows really320 . 321 . instructions).*}319 . {* If this field is non null, then the supplied function is 320 . called rather than the normal function. This allows really 321 . strange relocation methods to be accomodated (e.g., i960 callj 322 . instructions). *} 322 323 . bfd_reloc_status_type (*special_function) 323 . PARAMS ((bfd *abfd, 324 . arelent *reloc_entry, 325 . struct symbol_cache_entry *symbol, 326 . PTR data, 327 . asection *input_section, 328 . bfd *output_bfd, 329 . char **error_message)); 324 . PARAMS ((bfd *, arelent *, struct symbol_cache_entry *, PTR, asection *, 325 . bfd *, char **)); 330 326 . 331 . {* The textual name of the relocation type.*}327 . {* The textual name of the relocation type. *} 332 328 . char *name; 333 329 . 334 . 335 . 336 . 337 . 338 . 339 . 340 . 341 . 342 . 343 . 344 . 345 . 346 . 347 . 348 . 349 . b oolean partial_inplace;330 . {* Some formats record a relocation addend in the section contents 331 . rather than with the relocation. For ELF formats this is the 332 . distinction between USE_REL and USE_RELA (though the code checks 333 . for USE_REL == 1/0). The value of this field is TRUE if the 334 . addend is recorded with the section contents; when performing a 335 . partial link (ld -r) the section contents (the data) will be 336 . modified. The value of this field is FALSE if addends are 337 . recorded with the relocation (in arelent.addend); when performing 338 . a partial link the relocation will be modified. 339 . All relocations for all ELF USE_RELA targets should set this field 340 . to FALSE (values of TRUE should be looked on with suspicion). 341 . However, the converse is not true: not all relocations of all ELF 342 . USE_REL targets set this field to TRUE. Why this is so is peculiar 343 . to each particular target. For relocs that aren't used in partial 344 . links (e.g. GOT stuff) it doesn't matter what this is set to. *} 345 . bfd_boolean partial_inplace; 350 346 . 351 . {* The src_mask selects which parts of the read in data 352 . are to be used in the relocation sum. E.g., if this was an 8 bit 353 . byte of data which we read and relocated, this would be 354 . 0x000000ff. When we have relocs which have an addend, such as 355 . sun4 extended relocs, the value in the offset part of a 356 . relocating field is garbage so we never use it. In this case 357 . the mask would be 0x00000000. *} 347 . {* src_mask selects the part of the instruction (or data) to be used 348 . in the relocation sum. If the target relocations don't have an 349 . addend in the reloc, eg. ELF USE_REL, src_mask will normally equal 350 . dst_mask to extract the addend from the section contents. If 351 . relocations do have an addend in the reloc, eg. ELF USE_RELA, this 352 . field should be zero. Non-zero values for ELF USE_RELA targets are 353 . bogus as in those cases the value in the dst_mask part of the 354 . section contents should be treated as garbage. *} 358 355 . bfd_vma src_mask; 359 356 . 360 . {* The dst_mask selects which parts of the instruction are replaced 361 . into the instruction. In most cases src_mask == dst_mask, 362 . except in the above special case, where dst_mask would be 363 . 0x000000ff, and src_mask would be 0x00000000. *} 357 . {* dst_mask selects which parts of the instruction (or data) are 358 . replaced with a relocated value. *} 364 359 . bfd_vma dst_mask; 365 360 . 366 . {* When some formats create PC relative instructions, they leave 367 . the value of the pc of the place being relocated in the offset 368 . slot of the instruction, so that a PC relative relocation can 369 . be made just by adding in an ordinary offset (e.g., sun3 a.out). 370 . Some formats leave the displacement part of an instruction 371 . empty (e.g., m88k bcs); this flag signals the fact.*} 372 . boolean pcrel_offset; 361 . {* When some formats create PC relative instructions, they leave 362 . the value of the pc of the place being relocated in the offset 363 . slot of the instruction, so that a PC relative relocation can 364 . be made just by adding in an ordinary offset (e.g., sun3 a.out). 365 . Some formats leave the displacement part of an instruction 366 . empty (e.g., m88k bcs); this flag signals the fact. *} 367 . bfd_boolean pcrel_offset; 368 .}; 373 369 . 374 .};375 376 370 */ 377 371 … … 383 377 The HOWTO define is horrible and will go away. 384 378 385 .#define HOWTO(C, R, S,B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \386 . { (unsigned)C,R,S,B, P, BI, O,SF,NAME,INPLACE,MASKSRC,MASKDST,PC}379 .#define HOWTO(C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC) \ 380 . { (unsigned) C, R, S, B, P, BI, O, SF, NAME, INPLACE, MASKSRC, MASKDST, PC } 387 381 388 382 DESCRIPTION … … 390 384 moment, we are compatible, so do it this way. 391 385 392 .#define NEWHOWTO( FUNCTION, NAME,SIZE,REL,IN) HOWTO(0,0,SIZE,0,REL,0,complain_overflow_dont,FUNCTION, NAME,false,0,0,IN) 386 .#define NEWHOWTO(FUNCTION, NAME, SIZE, REL, IN) \ 387 . HOWTO (0, 0, SIZE, 0, REL, 0, complain_overflow_dont, FUNCTION, \ 388 . NAME, FALSE, 0, 0, IN) 393 389 . 394 390 … … 397 393 398 394 .#define EMPTY_HOWTO(C) \ 399 . HOWTO((C),0,0,0,false,0,complain_overflow_dont,NULL,NULL,false,0,0,false) 395 . HOWTO ((C), 0, 0, 0, FALSE, 0, complain_overflow_dont, NULL, \ 396 . NULL, FALSE, 0, 0, FALSE) 400 397 . 401 398 … … 403 400 Helper routine to turn a symbol into a relocation value. 404 401 405 .#define HOWTO_PREPARE(relocation, symbol) \ 406 . { \ 407 . if (symbol != (asymbol *)NULL) { \ 408 . if (bfd_is_com_section (symbol->section)) { \ 409 . relocation = 0; \ 410 . } \ 411 . else { \ 412 . relocation = symbol->value; \ 413 . } \ 414 . } \ 415 .} 416 402 .#define HOWTO_PREPARE(relocation, symbol) \ 403 . { \ 404 . if (symbol != (asymbol *) NULL) \ 405 . { \ 406 . if (bfd_is_com_section (symbol->section)) \ 407 . { \ 408 . relocation = 0; \ 409 . } \ 410 . else \ 411 . { \ 412 . relocation = symbol->value; \ 413 . } \ 414 . } \ 415 . } 416 . 417 417 */ 418 418 … … 454 454 How relocs are tied together in an <<asection>>: 455 455 456 .typedef struct relent_chain { 456 .typedef struct relent_chain 457 .{ 457 458 . arelent relent; 458 . struct relent_chain *next; 459 .} arelent_chain; 460 459 . struct relent_chain *next; 460 .} 461 .arelent_chain; 462 . 461 463 */ 462 464 … … 627 629 628 630 /* Is the address of the relocation really within the section? */ 629 if (reloc_entry->address > input_section->_cooked_size /630 bfd_octets_per_byte (abfd))631 if (reloc_entry->address > (input_section->_cooked_size 632 / bfd_octets_per_byte (abfd))) 631 633 return bfd_reloc_outofrange; 632 634 … … 643 645 644 646 /* Convert input-section-relative symbol value to absolute. */ 645 if (output_bfd && howto->partial_inplace == false) 647 if ((output_bfd && ! howto->partial_inplace) 648 || reloc_target_output_section == NULL) 646 649 output_base = 0; 647 650 else … … 656 659 symbol we are relocating against, plus any addend. */ 657 660 658 if (howto->pc_relative == true)661 if (howto->pc_relative) 659 662 { 660 663 /* This is a PC relative relocation. We want to set RELOCATION … … 669 672 the addend to be the negative of the position of the location 670 673 within the section; for example, i386-aout does this. For 671 i386-aout, pcrel_offset is false. Some other targets do not674 i386-aout, pcrel_offset is FALSE. Some other targets do not 672 675 include the position of the location; for example, m88kbcs, 673 or ELF. For those targets, pcrel_offset is true.676 or ELF. For those targets, pcrel_offset is TRUE. 674 677 675 678 If we are producing relocateable output, then we must ensure 676 679 that this reloc will be correctly computed when the final 677 relocation is done. If pcrel_offset is falsewe want to wind680 relocation is done. If pcrel_offset is FALSE we want to wind 678 681 up with the negative of the location within the section, 679 682 which means we must adjust the existing addend by the change 680 in the location within the section. If pcrel_offset is true683 in the location within the section. If pcrel_offset is TRUE 681 684 we do not want to adjust the existing addend at all. 682 685 … … 689 692 input_section->output_section->vma + input_section->output_offset; 690 693 691 if (howto->pcrel_offset == true)694 if (howto->pcrel_offset) 692 695 relocation -= reloc_entry->address; 693 696 } … … 695 698 if (output_bfd != (bfd *) NULL) 696 699 { 697 if ( howto->partial_inplace == false)700 if (! howto->partial_inplace) 698 701 { 699 702 /* This is a partial relocation, and we want to apply the relocation … … 819 822 relocation); 820 823 821 /* 822 Either we are relocating all the way, or we don't want to apply 823 the relocation to the reloc entry (probably because there isn't 824 any room in the output format to describe addends to relocs) 825 */ 824 /* Either we are relocating all the way, or we don't want to apply 825 the relocation to the reloc entry (probably because there isn't 826 any room in the output format to describe addends to relocs). */ 826 827 827 828 /* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler … … 850 851 relocation >>= (bfd_vma) howto->rightshift; 851 852 852 /* Shift everything up to where it's going to be used */ 853 853 /* Shift everything up to where it's going to be used. */ 854 854 relocation <<= (bfd_vma) howto->bitpos; 855 855 856 /* Wait for the day when all have the mask in them */856 /* Wait for the day when all have the mask in them. */ 857 857 858 858 /* What we do: … … 904 904 short x = bfd_get_16 (abfd, (bfd_byte *) data + octets); 905 905 DOIT (x); 906 bfd_put_16 (abfd, x, (unsigned char *) data + octets);906 bfd_put_16 (abfd, (bfd_vma) x, (unsigned char *) data + octets); 907 907 } 908 908 break; … … 911 911 long x = bfd_get_32 (abfd, (bfd_byte *) data + octets); 912 912 DOIT (x); 913 bfd_put_32 (abfd, x, (bfd_byte *) data + octets);913 bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets); 914 914 } 915 915 break; … … 919 919 relocation = -relocation; 920 920 DOIT (x); 921 bfd_put_32 (abfd, x, (bfd_byte *) data + octets);921 bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data + octets); 922 922 } 923 923 break; … … 928 928 relocation = -relocation; 929 929 DOIT (x); 930 bfd_put_16 (abfd, x, (bfd_byte *) data + octets);930 bfd_put_16 (abfd, (bfd_vma) x, (bfd_byte *) data + octets); 931 931 } 932 932 break; … … 975 975 For now, this function should be considered reserved for the 976 976 assembler. 977 978 977 */ 979 978 … … 1023 1022 1024 1023 /* Is the address of the relocation really within the section? */ 1025 if (reloc_entry->address > input_section->_cooked_size) 1024 if (reloc_entry->address > (input_section->_cooked_size 1025 / bfd_octets_per_byte (abfd))) 1026 1026 return bfd_reloc_outofrange; 1027 1027 … … 1038 1038 1039 1039 /* Convert input-section-relative symbol value to absolute. */ 1040 if ( howto->partial_inplace == false)1040 if (! howto->partial_inplace) 1041 1041 output_base = 0; 1042 1042 else … … 1051 1051 symbol we are relocating against, plus any addend. */ 1052 1052 1053 if (howto->pc_relative == true)1053 if (howto->pc_relative) 1054 1054 { 1055 1055 /* This is a PC relative relocation. We want to set RELOCATION … … 1064 1064 the addend to be the negative of the position of the location 1065 1065 within the section; for example, i386-aout does this. For 1066 i386-aout, pcrel_offset is false. Some other targets do not1066 i386-aout, pcrel_offset is FALSE. Some other targets do not 1067 1067 include the position of the location; for example, m88kbcs, 1068 or ELF. For those targets, pcrel_offset is true.1068 or ELF. For those targets, pcrel_offset is TRUE. 1069 1069 1070 1070 If we are producing relocateable output, then we must ensure 1071 1071 that this reloc will be correctly computed when the final 1072 relocation is done. If pcrel_offset is falsewe want to wind1072 relocation is done. If pcrel_offset is FALSE we want to wind 1073 1073 up with the negative of the location within the section, 1074 1074 which means we must adjust the existing addend by the change 1075 in the location within the section. If pcrel_offset is true1075 in the location within the section. If pcrel_offset is TRUE 1076 1076 we do not want to adjust the existing addend at all. 1077 1077 … … 1084 1084 input_section->output_section->vma + input_section->output_offset; 1085 1085 1086 if (howto->pcrel_offset == true && howto->partial_inplace == true)1086 if (howto->pcrel_offset && howto->partial_inplace) 1087 1087 relocation -= reloc_entry->address; 1088 1088 } 1089 1089 1090 if ( howto->partial_inplace == false)1090 if (! howto->partial_inplace) 1091 1091 { 1092 1092 /* This is a partial relocation, and we want to apply the relocation … … 1104 1104 If we've relocated with a symbol with a section, change 1105 1105 into a ref to the section belonging to the symbol. */ 1106 1107 1106 reloc_entry->address += input_section->output_offset; 1108 1107 … … 1180 1179 made it no worse 1181 1180 7) if they are different you have to figure out which version is 1182 right 1183 */ 1181 right. */ 1184 1182 relocation -= reloc_entry->addend; 1185 1183 #endif … … 1206 1204 relocation); 1207 1205 1208 /* 1209 Either we are relocating all the way, or we don't want to apply 1210 the relocation to the reloc entry (probably because there isn't 1211 any room in the output format to describe addends to relocs) 1212 */ 1206 /* Either we are relocating all the way, or we don't want to apply 1207 the relocation to the reloc entry (probably because there isn't 1208 any room in the output format to describe addends to relocs). */ 1213 1209 1214 1210 /* The cast to bfd_vma avoids a bug in the Alpha OSF/1 C compiler … … 1237 1233 relocation >>= (bfd_vma) howto->rightshift; 1238 1234 1239 /* Shift everything up to where it's going to be used */ 1240 1235 /* Shift everything up to where it's going to be used. */ 1241 1236 relocation <<= (bfd_vma) howto->bitpos; 1242 1237 1243 /* Wait for the day when all have the mask in them */1238 /* Wait for the day when all have the mask in them. */ 1244 1239 1245 1240 /* What we do: … … 1293 1288 short x = bfd_get_16 (abfd, (bfd_byte *) data); 1294 1289 DOIT (x); 1295 bfd_put_16 (abfd, x, (unsigned char *) data);1290 bfd_put_16 (abfd, (bfd_vma) x, (unsigned char *) data); 1296 1291 } 1297 1292 break; … … 1300 1295 long x = bfd_get_32 (abfd, (bfd_byte *) data); 1301 1296 DOIT (x); 1302 bfd_put_32 (abfd, x, (bfd_byte *) data);1297 bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data); 1303 1298 } 1304 1299 break; … … 1308 1303 relocation = -relocation; 1309 1304 DOIT (x); 1310 bfd_put_32 (abfd, x, (bfd_byte *) data);1305 bfd_put_32 (abfd, (bfd_vma) x, (bfd_byte *) data); 1311 1306 } 1312 1307 break; … … 1380 1375 arrange for the contents of the section to be the negative of the 1381 1376 offset of the location within the section; for such targets 1382 pcrel_offset is false. Other targets (e.g., m88kbcs or ELF)1377 pcrel_offset is FALSE. Other targets (e.g., m88kbcs or ELF) 1383 1378 simply leave the contents of the section as zero; for such 1384 targets pcrel_offset is true. If pcrel_offset is falsewe do not1379 targets pcrel_offset is TRUE. If pcrel_offset is FALSE we do not 1385 1380 need to subtract out the offset of the location within the 1386 1381 section (which is just ADDRESS). */ … … 1682 1677 BFD_RELOC_8_GOTOFF 1683 1678 ENUMX 1679 BFD_RELOC_64_PLT_PCREL 1680 ENUMX 1684 1681 BFD_RELOC_32_PLT_PCREL 1685 1682 ENUMX … … 1689 1686 ENUMX 1690 1687 BFD_RELOC_8_PLT_PCREL 1688 ENUMX 1689 BFD_RELOC_64_PLTOFF 1691 1690 ENUMX 1692 1691 BFD_RELOC_32_PLTOFF … … 1852 1851 BFD_RELOC_64_PCREL 1853 1852 ENUMX 1853 BFD_RELOC_SPARC_PLT32 1854 ENUMX 1854 1855 BFD_RELOC_SPARC_PLT64 1855 1856 ENUMX … … 1872 1873 ENUMDOC 1873 1874 SPARC little endian relocation 1875 ENUM 1876 BFD_RELOC_SPARC_TLS_GD_HI22 1877 ENUMX 1878 BFD_RELOC_SPARC_TLS_GD_LO10 1879 ENUMX 1880 BFD_RELOC_SPARC_TLS_GD_ADD 1881 ENUMX 1882 BFD_RELOC_SPARC_TLS_GD_CALL 1883 ENUMX 1884 BFD_RELOC_SPARC_TLS_LDM_HI22 1885 ENUMX 1886 BFD_RELOC_SPARC_TLS_LDM_LO10 1887 ENUMX 1888 BFD_RELOC_SPARC_TLS_LDM_ADD 1889 ENUMX 1890 BFD_RELOC_SPARC_TLS_LDM_CALL 1891 ENUMX 1892 BFD_RELOC_SPARC_TLS_LDO_HIX22 1893 ENUMX 1894 BFD_RELOC_SPARC_TLS_LDO_LOX10 1895 ENUMX 1896 BFD_RELOC_SPARC_TLS_LDO_ADD 1897 ENUMX 1898 BFD_RELOC_SPARC_TLS_IE_HI22 1899 ENUMX 1900 BFD_RELOC_SPARC_TLS_IE_LO10 1901 ENUMX 1902 BFD_RELOC_SPARC_TLS_IE_LD 1903 ENUMX 1904 BFD_RELOC_SPARC_TLS_IE_LDX 1905 ENUMX 1906 BFD_RELOC_SPARC_TLS_IE_ADD 1907 ENUMX 1908 BFD_RELOC_SPARC_TLS_LE_HIX22 1909 ENUMX 1910 BFD_RELOC_SPARC_TLS_LE_LOX10 1911 ENUMX 1912 BFD_RELOC_SPARC_TLS_DTPMOD32 1913 ENUMX 1914 BFD_RELOC_SPARC_TLS_DTPMOD64 1915 ENUMX 1916 BFD_RELOC_SPARC_TLS_DTPOFF32 1917 ENUMX 1918 BFD_RELOC_SPARC_TLS_DTPOFF64 1919 ENUMX 1920 BFD_RELOC_SPARC_TLS_TPOFF32 1921 ENUMX 1922 BFD_RELOC_SPARC_TLS_TPOFF64 1923 ENUMDOC 1924 SPARC TLS relocations 1874 1925 1875 1926 ENUM … … 1928 1979 3 - jsr (target of branch) 1929 1980 1930 The GNU linker currently doesn't do any of this optimizing.1931 1932 ENUM1933 BFD_RELOC_ALPHA_USER_LITERAL1934 ENUMX1935 BFD_RELOC_ALPHA_USER_LITUSE_BASE1936 ENUMX1937 BFD_RELOC_ALPHA_USER_LITUSE_BYTOFF1938 ENUMX1939 BFD_RELOC_ALPHA_USER_LITUSE_JSR1940 ENUMX1941 BFD_RELOC_ALPHA_USER_GPDISP1942 ENUMX1943 BFD_RELOC_ALPHA_USER_GPRELHIGH1944 ENUMX1945 BFD_RELOC_ALPHA_USER_GPRELLOW1946 ENUMDOC1947 The BFD_RELOC_ALPHA_USER_* relocations are used by the assembler to1948 process the explicit !<reloc>!sequence relocations, and are mapped1949 into the normal relocations at the end of processing.1950 1951 1981 ENUM 1952 1982 BFD_RELOC_ALPHA_HINT … … 1967 1997 The CODEADDR relocation outputs a STO_CA in the object file, 1968 1998 which is filled by the linker. 1999 2000 ENUM 2001 BFD_RELOC_ALPHA_GPREL_HI16 2002 ENUMX 2003 BFD_RELOC_ALPHA_GPREL_LO16 2004 ENUMDOC 2005 The GPREL_HI/LO relocations together form a 32-bit offset from the 2006 GP register. 2007 2008 ENUM 2009 BFD_RELOC_ALPHA_BRSGP 2010 ENUMDOC 2011 Like BFD_RELOC_23_PCREL_S2, except that the source and target must 2012 share a common GP, and the target address is adjusted for 2013 STO_ALPHA_STD_GPLOAD. 2014 2015 ENUM 2016 BFD_RELOC_ALPHA_TLSGD 2017 ENUMX 2018 BFD_RELOC_ALPHA_TLSLDM 2019 ENUMX 2020 BFD_RELOC_ALPHA_DTPMOD64 2021 ENUMX 2022 BFD_RELOC_ALPHA_GOTDTPREL16 2023 ENUMX 2024 BFD_RELOC_ALPHA_DTPREL64 2025 ENUMX 2026 BFD_RELOC_ALPHA_DTPREL_HI16 2027 ENUMX 2028 BFD_RELOC_ALPHA_DTPREL_LO16 2029 ENUMX 2030 BFD_RELOC_ALPHA_DTPREL16 2031 ENUMX 2032 BFD_RELOC_ALPHA_GOTTPREL16 2033 ENUMX 2034 BFD_RELOC_ALPHA_TPREL64 2035 ENUMX 2036 BFD_RELOC_ALPHA_TPREL_HI16 2037 ENUMX 2038 BFD_RELOC_ALPHA_TPREL_LO16 2039 ENUMX 2040 BFD_RELOC_ALPHA_TPREL16 2041 ENUMDOC 2042 Alpha thread-local storage relocations. 1969 2043 1970 2044 ENUM … … 2008 2082 Like BFD_RELOC_LO16, but PC relative. 2009 2083 2010 ENUMEQ2011 BFD_RELOC_MIPS_GPREL2012 BFD_RELOC_GPREL162013 ENUMDOC2014 Relocation relative to the global pointer.2015 2016 2084 ENUM 2017 2085 BFD_RELOC_MIPS_LITERAL … … 2023 2091 ENUMX 2024 2092 BFD_RELOC_MIPS_CALL16 2025 ENUMEQX2026 BFD_RELOC_MIPS_GPREL322027 BFD_RELOC_GPREL322028 2093 ENUMX 2029 2094 BFD_RELOC_MIPS_GOT_HI16 … … 2065 2130 BFD_RELOC_MIPS_JALR 2066 2131 COMMENT 2132 ENUM 2133 BFD_RELOC_FRV_LABEL16 2134 ENUMX 2135 BFD_RELOC_FRV_LABEL24 2136 ENUMX 2137 BFD_RELOC_FRV_LO16 2138 ENUMX 2139 BFD_RELOC_FRV_HI16 2140 ENUMX 2141 BFD_RELOC_FRV_GPREL12 2142 ENUMX 2143 BFD_RELOC_FRV_GPRELU12 2144 ENUMX 2145 BFD_RELOC_FRV_GPREL32 2146 ENUMX 2147 BFD_RELOC_FRV_GPRELHI 2148 ENUMX 2149 BFD_RELOC_FRV_GPRELLO 2150 ENUMDOC 2151 Fujitsu Frv Relocations. 2152 COMMENT 2153 COMMENT 2067 2154 ENUMDOC 2068 2155 MIPS ELF relocations. … … 2086 2173 ENUMX 2087 2174 BFD_RELOC_386_GOTPC 2175 ENUMX 2176 BFD_RELOC_386_TLS_TPOFF 2177 ENUMX 2178 BFD_RELOC_386_TLS_IE 2179 ENUMX 2180 BFD_RELOC_386_TLS_GOTIE 2181 ENUMX 2182 BFD_RELOC_386_TLS_LE 2183 ENUMX 2184 BFD_RELOC_386_TLS_GD 2185 ENUMX 2186 BFD_RELOC_386_TLS_LDM 2187 ENUMX 2188 BFD_RELOC_386_TLS_LDO_32 2189 ENUMX 2190 BFD_RELOC_386_TLS_IE_32 2191 ENUMX 2192 BFD_RELOC_386_TLS_LE_32 2193 ENUMX 2194 BFD_RELOC_386_TLS_DTPMOD32 2195 ENUMX 2196 BFD_RELOC_386_TLS_DTPOFF32 2197 ENUMX 2198 BFD_RELOC_386_TLS_TPOFF32 2088 2199 ENUMDOC 2089 2200 i386/elf relocations … … 2105 2216 ENUMX 2106 2217 BFD_RELOC_X86_64_32S 2218 ENUMX 2219 BFD_RELOC_X86_64_DTPMOD64 2220 ENUMX 2221 BFD_RELOC_X86_64_DTPOFF64 2222 ENUMX 2223 BFD_RELOC_X86_64_TPOFF64 2224 ENUMX 2225 BFD_RELOC_X86_64_TLSGD 2226 ENUMX 2227 BFD_RELOC_X86_64_TLSLD 2228 ENUMX 2229 BFD_RELOC_X86_64_DTPOFF32 2230 ENUMX 2231 BFD_RELOC_X86_64_GOTTPOFF 2232 ENUMX 2233 BFD_RELOC_X86_64_TPOFF32 2107 2234 ENUMDOC 2108 2235 x86-64/elf relocations … … 2136 2263 2137 2264 ENUM 2265 BFD_RELOC_PDP11_DISP_8_PCREL 2266 ENUMX 2267 BFD_RELOC_PDP11_DISP_6_PCREL 2268 ENUMDOC 2269 PDP11 relocations 2270 2271 ENUM 2138 2272 BFD_RELOC_PJ_CODE_HI16 2139 2273 ENUMX … … 2210 2344 ENUMX 2211 2345 BFD_RELOC_PPC_EMB_RELSDA 2346 ENUMX 2347 BFD_RELOC_PPC64_HIGHER 2348 ENUMX 2349 BFD_RELOC_PPC64_HIGHER_S 2350 ENUMX 2351 BFD_RELOC_PPC64_HIGHEST 2352 ENUMX 2353 BFD_RELOC_PPC64_HIGHEST_S 2354 ENUMX 2355 BFD_RELOC_PPC64_TOC16_LO 2356 ENUMX 2357 BFD_RELOC_PPC64_TOC16_HI 2358 ENUMX 2359 BFD_RELOC_PPC64_TOC16_HA 2360 ENUMX 2361 BFD_RELOC_PPC64_TOC 2362 ENUMX 2363 BFD_RELOC_PPC64_PLTGOT16 2364 ENUMX 2365 BFD_RELOC_PPC64_PLTGOT16_LO 2366 ENUMX 2367 BFD_RELOC_PPC64_PLTGOT16_HI 2368 ENUMX 2369 BFD_RELOC_PPC64_PLTGOT16_HA 2370 ENUMX 2371 BFD_RELOC_PPC64_ADDR16_DS 2372 ENUMX 2373 BFD_RELOC_PPC64_ADDR16_LO_DS 2374 ENUMX 2375 BFD_RELOC_PPC64_GOT16_DS 2376 ENUMX 2377 BFD_RELOC_PPC64_GOT16_LO_DS 2378 ENUMX 2379 BFD_RELOC_PPC64_PLT16_LO_DS 2380 ENUMX 2381 BFD_RELOC_PPC64_SECTOFF_DS 2382 ENUMX 2383 BFD_RELOC_PPC64_SECTOFF_LO_DS 2384 ENUMX 2385 BFD_RELOC_PPC64_TOC16_DS 2386 ENUMX 2387 BFD_RELOC_PPC64_TOC16_LO_DS 2388 ENUMX 2389 BFD_RELOC_PPC64_PLTGOT16_DS 2390 ENUMX 2391 BFD_RELOC_PPC64_PLTGOT16_LO_DS 2212 2392 ENUMDOC 2213 2393 Power(rs6000) and PowerPC relocations. 2394 2395 ENUM 2396 BFD_RELOC_PPC_TLS 2397 ENUMX 2398 BFD_RELOC_PPC_DTPMOD 2399 ENUMX 2400 BFD_RELOC_PPC_TPREL16 2401 ENUMX 2402 BFD_RELOC_PPC_TPREL16_LO 2403 ENUMX 2404 BFD_RELOC_PPC_TPREL16_HI 2405 ENUMX 2406 BFD_RELOC_PPC_TPREL16_HA 2407 ENUMX 2408 BFD_RELOC_PPC_TPREL 2409 ENUMX 2410 BFD_RELOC_PPC_DTPREL16 2411 ENUMX 2412 BFD_RELOC_PPC_DTPREL16_LO 2413 ENUMX 2414 BFD_RELOC_PPC_DTPREL16_HI 2415 ENUMX 2416 BFD_RELOC_PPC_DTPREL16_HA 2417 ENUMX 2418 BFD_RELOC_PPC_DTPREL 2419 ENUMX 2420 BFD_RELOC_PPC_GOT_TLSGD16 2421 ENUMX 2422 BFD_RELOC_PPC_GOT_TLSGD16_LO 2423 ENUMX 2424 BFD_RELOC_PPC_GOT_TLSGD16_HI 2425 ENUMX 2426 BFD_RELOC_PPC_GOT_TLSGD16_HA 2427 ENUMX 2428 BFD_RELOC_PPC_GOT_TLSLD16 2429 ENUMX 2430 BFD_RELOC_PPC_GOT_TLSLD16_LO 2431 ENUMX 2432 BFD_RELOC_PPC_GOT_TLSLD16_HI 2433 ENUMX 2434 BFD_RELOC_PPC_GOT_TLSLD16_HA 2435 ENUMX 2436 BFD_RELOC_PPC_GOT_TPREL16 2437 ENUMX 2438 BFD_RELOC_PPC_GOT_TPREL16_LO 2439 ENUMX 2440 BFD_RELOC_PPC_GOT_TPREL16_HI 2441 ENUMX 2442 BFD_RELOC_PPC_GOT_TPREL16_HA 2443 ENUMX 2444 BFD_RELOC_PPC_GOT_DTPREL16 2445 ENUMX 2446 BFD_RELOC_PPC_GOT_DTPREL16_LO 2447 ENUMX 2448 BFD_RELOC_PPC_GOT_DTPREL16_HI 2449 ENUMX 2450 BFD_RELOC_PPC_GOT_DTPREL16_HA 2451 ENUMX 2452 BFD_RELOC_PPC64_TPREL16_DS 2453 ENUMX 2454 BFD_RELOC_PPC64_TPREL16_LO_DS 2455 ENUMX 2456 BFD_RELOC_PPC64_TPREL16_HIGHER 2457 ENUMX 2458 BFD_RELOC_PPC64_TPREL16_HIGHERA 2459 ENUMX 2460 BFD_RELOC_PPC64_TPREL16_HIGHEST 2461 ENUMX 2462 BFD_RELOC_PPC64_TPREL16_HIGHESTA 2463 ENUMX 2464 BFD_RELOC_PPC64_DTPREL16_DS 2465 ENUMX 2466 BFD_RELOC_PPC64_DTPREL16_LO_DS 2467 ENUMX 2468 BFD_RELOC_PPC64_DTPREL16_HIGHER 2469 ENUMX 2470 BFD_RELOC_PPC64_DTPREL16_HIGHERA 2471 ENUMX 2472 BFD_RELOC_PPC64_DTPREL16_HIGHEST 2473 ENUMX 2474 BFD_RELOC_PPC64_DTPREL16_HIGHESTA 2475 ENUMDOC 2476 PowerPC and PowerPC64 thread-local storage relocations. 2214 2477 2215 2478 ENUM … … 2257 2520 BFD_RELOC_ARM_CP_OFF_IMM 2258 2521 ENUMX 2522 BFD_RELOC_ARM_CP_OFF_IMM_S2 2523 ENUMX 2259 2524 BFD_RELOC_ARM_ADR_IMM 2260 2525 ENUMX … … 2348 2613 ENUMX 2349 2614 BFD_RELOC_SH_GOTPC 2350 ENUMDOC 2351 Hitachi SH relocs. Not all of these appear in object files. 2615 ENUMX 2616 BFD_RELOC_SH_GOT_LOW16 2617 ENUMX 2618 BFD_RELOC_SH_GOT_MEDLOW16 2619 ENUMX 2620 BFD_RELOC_SH_GOT_MEDHI16 2621 ENUMX 2622 BFD_RELOC_SH_GOT_HI16 2623 ENUMX 2624 BFD_RELOC_SH_GOTPLT_LOW16 2625 ENUMX 2626 BFD_RELOC_SH_GOTPLT_MEDLOW16 2627 ENUMX 2628 BFD_RELOC_SH_GOTPLT_MEDHI16 2629 ENUMX 2630 BFD_RELOC_SH_GOTPLT_HI16 2631 ENUMX 2632 BFD_RELOC_SH_PLT_LOW16 2633 ENUMX 2634 BFD_RELOC_SH_PLT_MEDLOW16 2635 ENUMX 2636 BFD_RELOC_SH_PLT_MEDHI16 2637 ENUMX 2638 BFD_RELOC_SH_PLT_HI16 2639 ENUMX 2640 BFD_RELOC_SH_GOTOFF_LOW16 2641 ENUMX 2642 BFD_RELOC_SH_GOTOFF_MEDLOW16 2643 ENUMX 2644 BFD_RELOC_SH_GOTOFF_MEDHI16 2645 ENUMX 2646 BFD_RELOC_SH_GOTOFF_HI16 2647 ENUMX 2648 BFD_RELOC_SH_GOTPC_LOW16 2649 ENUMX 2650 BFD_RELOC_SH_GOTPC_MEDLOW16 2651 ENUMX 2652 BFD_RELOC_SH_GOTPC_MEDHI16 2653 ENUMX 2654 BFD_RELOC_SH_GOTPC_HI16 2655 ENUMX 2656 BFD_RELOC_SH_COPY64 2657 ENUMX 2658 BFD_RELOC_SH_GLOB_DAT64 2659 ENUMX 2660 BFD_RELOC_SH_JMP_SLOT64 2661 ENUMX 2662 BFD_RELOC_SH_RELATIVE64 2663 ENUMX 2664 BFD_RELOC_SH_GOT10BY4 2665 ENUMX 2666 BFD_RELOC_SH_GOT10BY8 2667 ENUMX 2668 BFD_RELOC_SH_GOTPLT10BY4 2669 ENUMX 2670 BFD_RELOC_SH_GOTPLT10BY8 2671 ENUMX 2672 BFD_RELOC_SH_GOTPLT32 2673 ENUMX 2674 BFD_RELOC_SH_SHMEDIA_CODE 2675 ENUMX 2676 BFD_RELOC_SH_IMMU5 2677 ENUMX 2678 BFD_RELOC_SH_IMMS6 2679 ENUMX 2680 BFD_RELOC_SH_IMMS6BY32 2681 ENUMX 2682 BFD_RELOC_SH_IMMU6 2683 ENUMX 2684 BFD_RELOC_SH_IMMS10 2685 ENUMX 2686 BFD_RELOC_SH_IMMS10BY2 2687 ENUMX 2688 BFD_RELOC_SH_IMMS10BY4 2689 ENUMX 2690 BFD_RELOC_SH_IMMS10BY8 2691 ENUMX 2692 BFD_RELOC_SH_IMMS16 2693 ENUMX 2694 BFD_RELOC_SH_IMMU16 2695 ENUMX 2696 BFD_RELOC_SH_IMM_LOW16 2697 ENUMX 2698 BFD_RELOC_SH_IMM_LOW16_PCREL 2699 ENUMX 2700 BFD_RELOC_SH_IMM_MEDLOW16 2701 ENUMX 2702 BFD_RELOC_SH_IMM_MEDLOW16_PCREL 2703 ENUMX 2704 BFD_RELOC_SH_IMM_MEDHI16 2705 ENUMX 2706 BFD_RELOC_SH_IMM_MEDHI16_PCREL 2707 ENUMX 2708 BFD_RELOC_SH_IMM_HI16 2709 ENUMX 2710 BFD_RELOC_SH_IMM_HI16_PCREL 2711 ENUMX 2712 BFD_RELOC_SH_PT_16 2713 ENUMX 2714 BFD_RELOC_SH_TLS_GD_32 2715 ENUMX 2716 BFD_RELOC_SH_TLS_LD_32 2717 ENUMX 2718 BFD_RELOC_SH_TLS_LDO_32 2719 ENUMX 2720 BFD_RELOC_SH_TLS_IE_32 2721 ENUMX 2722 BFD_RELOC_SH_TLS_LE_32 2723 ENUMX 2724 BFD_RELOC_SH_TLS_DTPMOD32 2725 ENUMX 2726 BFD_RELOC_SH_TLS_DTPOFF32 2727 ENUMX 2728 BFD_RELOC_SH_TLS_TPOFF32 2729 ENUMDOC 2730 Renesas / SuperH SH relocs. Not all of these appear in object files. 2352 2731 2353 2732 ENUM … … 2461 2840 2462 2841 ENUM 2842 BFD_RELOC_DLX_HI16_S 2843 ENUMDOC 2844 DLX relocs 2845 ENUM 2846 BFD_RELOC_DLX_LO16 2847 ENUMDOC 2848 DLX relocs 2849 ENUM 2850 BFD_RELOC_DLX_JMP26 2851 ENUMDOC 2852 DLX relocs 2853 2854 ENUM 2463 2855 BFD_RELOC_M32R_24 2464 2856 ENUMDOC 2465 Mitsubishi M32Rrelocs.2857 Renesas M32R (formerly Mitsubishi M32R) relocs. 2466 2858 This is a 24 bit absolute address. 2467 2859 ENUM … … 2570 2962 ENUMDOC 2571 2963 This is a 16 bit offset from the call table base pointer. 2572 COMMENT 2573 2964 ENUM 2965 BFD_RELOC_V850_LONGCALL 2966 ENUMDOC 2967 Used for relaxing indirect function calls. 2968 ENUM 2969 BFD_RELOC_V850_LONGJUMP 2970 ENUMDOC 2971 Used for relaxing indirect jumps. 2972 ENUM 2973 BFD_RELOC_V850_ALIGN 2974 ENUMDOC 2975 Used to maintain alignment whilst relaxing. 2574 2976 ENUM 2575 2977 BFD_RELOC_MN10300_32_PCREL … … 2679 3081 2680 3082 ENUM 3083 BFD_RELOC_MMIX_GETA 3084 ENUMX 3085 BFD_RELOC_MMIX_GETA_1 3086 ENUMX 3087 BFD_RELOC_MMIX_GETA_2 3088 ENUMX 3089 BFD_RELOC_MMIX_GETA_3 3090 ENUMDOC 3091 These are relocations for the GETA instruction. 3092 ENUM 3093 BFD_RELOC_MMIX_CBRANCH 3094 ENUMX 3095 BFD_RELOC_MMIX_CBRANCH_J 3096 ENUMX 3097 BFD_RELOC_MMIX_CBRANCH_1 3098 ENUMX 3099 BFD_RELOC_MMIX_CBRANCH_2 3100 ENUMX 3101 BFD_RELOC_MMIX_CBRANCH_3 3102 ENUMDOC 3103 These are relocations for a conditional branch instruction. 3104 ENUM 3105 BFD_RELOC_MMIX_PUSHJ 3106 ENUMX 3107 BFD_RELOC_MMIX_PUSHJ_1 3108 ENUMX 3109 BFD_RELOC_MMIX_PUSHJ_2 3110 ENUMX 3111 BFD_RELOC_MMIX_PUSHJ_3 3112 ENUMDOC 3113 These are relocations for the PUSHJ instruction. 3114 ENUM 3115 BFD_RELOC_MMIX_JMP 3116 ENUMX 3117 BFD_RELOC_MMIX_JMP_1 3118 ENUMX 3119 BFD_RELOC_MMIX_JMP_2 3120 ENUMX 3121 BFD_RELOC_MMIX_JMP_3 3122 ENUMDOC 3123 These are relocations for the JMP instruction. 3124 ENUM 3125 BFD_RELOC_MMIX_ADDR19 3126 ENUMDOC 3127 This is a relocation for a relative address as in a GETA instruction or 3128 a branch. 3129 ENUM 3130 BFD_RELOC_MMIX_ADDR27 3131 ENUMDOC 3132 This is a relocation for a relative address as in a JMP instruction. 3133 ENUM 3134 BFD_RELOC_MMIX_REG_OR_BYTE 3135 ENUMDOC 3136 This is a relocation for an instruction field that may be a general 3137 register or a value 0..255. 3138 ENUM 3139 BFD_RELOC_MMIX_REG 3140 ENUMDOC 3141 This is a relocation for an instruction field that may be a general 3142 register. 3143 ENUM 3144 BFD_RELOC_MMIX_BASE_PLUS_OFFSET 3145 ENUMDOC 3146 This is a relocation for two instruction fields holding a register and 3147 an offset, the equivalent of the relocation. 3148 ENUM 3149 BFD_RELOC_MMIX_LOCAL 3150 ENUMDOC 3151 This relocation is an assertion that the expression is not allocated as 3152 a global register. It does not modify contents. 3153 3154 ENUM 2681 3155 BFD_RELOC_AVR_7_PCREL 2682 3156 ENUMDOC … … 2762 3236 This is a 32 bit reloc for the AVR that stores 23 bit value 2763 3237 into 22 bits. 3238 3239 ENUM 3240 BFD_RELOC_390_12 3241 ENUMDOC 3242 Direct 12 bit. 3243 ENUM 3244 BFD_RELOC_390_GOT12 3245 ENUMDOC 3246 12 bit GOT offset. 3247 ENUM 3248 BFD_RELOC_390_PLT32 3249 ENUMDOC 3250 32 bit PC relative PLT address. 3251 ENUM 3252 BFD_RELOC_390_COPY 3253 ENUMDOC 3254 Copy symbol at runtime. 3255 ENUM 3256 BFD_RELOC_390_GLOB_DAT 3257 ENUMDOC 3258 Create GOT entry. 3259 ENUM 3260 BFD_RELOC_390_JMP_SLOT 3261 ENUMDOC 3262 Create PLT entry. 3263 ENUM 3264 BFD_RELOC_390_RELATIVE 3265 ENUMDOC 3266 Adjust by program base. 3267 ENUM 3268 BFD_RELOC_390_GOTPC 3269 ENUMDOC 3270 32 bit PC relative offset to GOT. 3271 ENUM 3272 BFD_RELOC_390_GOT16 3273 ENUMDOC 3274 16 bit GOT offset. 3275 ENUM 3276 BFD_RELOC_390_PC16DBL 3277 ENUMDOC 3278 PC relative 16 bit shifted by 1. 3279 ENUM 3280 BFD_RELOC_390_PLT16DBL 3281 ENUMDOC 3282 16 bit PC rel. PLT shifted by 1. 3283 ENUM 3284 BFD_RELOC_390_PC32DBL 3285 ENUMDOC 3286 PC relative 32 bit shifted by 1. 3287 ENUM 3288 BFD_RELOC_390_PLT32DBL 3289 ENUMDOC 3290 32 bit PC rel. PLT shifted by 1. 3291 ENUM 3292 BFD_RELOC_390_GOTPCDBL 3293 ENUMDOC 3294 32 bit PC rel. GOT shifted by 1. 3295 ENUM 3296 BFD_RELOC_390_GOT64 3297 ENUMDOC 3298 64 bit GOT offset. 3299 ENUM 3300 BFD_RELOC_390_PLT64 3301 ENUMDOC 3302 64 bit PC relative PLT address. 3303 ENUM 3304 BFD_RELOC_390_GOTENT 3305 ENUMDOC 3306 32 bit rel. offset to GOT entry. 3307 ENUM 3308 BFD_RELOC_390_GOTOFF64 3309 ENUMDOC 3310 64 bit offset to GOT. 3311 ENUM 3312 BFD_RELOC_390_GOTPLT12 3313 ENUMDOC 3314 12-bit offset to symbol-entry within GOT, with PLT handling. 3315 ENUM 3316 BFD_RELOC_390_GOTPLT16 3317 ENUMDOC 3318 16-bit offset to symbol-entry within GOT, with PLT handling. 3319 ENUM 3320 BFD_RELOC_390_GOTPLT32 3321 ENUMDOC 3322 32-bit offset to symbol-entry within GOT, with PLT handling. 3323 ENUM 3324 BFD_RELOC_390_GOTPLT64 3325 ENUMDOC 3326 64-bit offset to symbol-entry within GOT, with PLT handling. 3327 ENUM 3328 BFD_RELOC_390_GOTPLTENT 3329 ENUMDOC 3330 32-bit rel. offset to symbol-entry within GOT, with PLT handling. 3331 ENUM 3332 BFD_RELOC_390_PLTOFF16 3333 ENUMDOC 3334 16-bit rel. offset from the GOT to a PLT entry. 3335 ENUM 3336 BFD_RELOC_390_PLTOFF32 3337 ENUMDOC 3338 32-bit rel. offset from the GOT to a PLT entry. 3339 ENUM 3340 BFD_RELOC_390_PLTOFF64 3341 ENUMDOC 3342 64-bit rel. offset from the GOT to a PLT entry. 3343 3344 ENUM 3345 BFD_RELOC_390_TLS_LOAD 3346 ENUMX 3347 BFD_RELOC_390_TLS_GDCALL 3348 ENUMX 3349 BFD_RELOC_390_TLS_LDCALL 3350 ENUMX 3351 BFD_RELOC_390_TLS_GD32 3352 ENUMX 3353 BFD_RELOC_390_TLS_GD64 3354 ENUMX 3355 BFD_RELOC_390_TLS_GOTIE12 3356 ENUMX 3357 BFD_RELOC_390_TLS_GOTIE32 3358 ENUMX 3359 BFD_RELOC_390_TLS_GOTIE64 3360 ENUMX 3361 BFD_RELOC_390_TLS_LDM32 3362 ENUMX 3363 BFD_RELOC_390_TLS_LDM64 3364 ENUMX 3365 BFD_RELOC_390_TLS_IE32 3366 ENUMX 3367 BFD_RELOC_390_TLS_IE64 3368 ENUMX 3369 BFD_RELOC_390_TLS_IEENT 3370 ENUMX 3371 BFD_RELOC_390_TLS_LE32 3372 ENUMX 3373 BFD_RELOC_390_TLS_LE64 3374 ENUMX 3375 BFD_RELOC_390_TLS_LDO32 3376 ENUMX 3377 BFD_RELOC_390_TLS_LDO64 3378 ENUMX 3379 BFD_RELOC_390_TLS_DTPMOD 3380 ENUMX 3381 BFD_RELOC_390_TLS_DTPOFF 3382 ENUMX 3383 BFD_RELOC_390_TLS_TPOFF 3384 ENUMDOC 3385 s390 tls relocations. 3386 3387 ENUM 3388 BFD_RELOC_IP2K_FR9 3389 ENUMDOC 3390 Scenix IP2K - 9-bit register number / data address 3391 ENUM 3392 BFD_RELOC_IP2K_BANK 3393 ENUMDOC 3394 Scenix IP2K - 4-bit register/data bank number 3395 ENUM 3396 BFD_RELOC_IP2K_ADDR16CJP 3397 ENUMDOC 3398 Scenix IP2K - low 13 bits of instruction word address 3399 ENUM 3400 BFD_RELOC_IP2K_PAGE3 3401 ENUMDOC 3402 Scenix IP2K - high 3 bits of instruction word address 3403 ENUM 3404 BFD_RELOC_IP2K_LO8DATA 3405 ENUMX 3406 BFD_RELOC_IP2K_HI8DATA 3407 ENUMX 3408 BFD_RELOC_IP2K_EX8DATA 3409 ENUMDOC 3410 Scenix IP2K - ext/low/high 8 bits of data address 3411 ENUM 3412 BFD_RELOC_IP2K_LO8INSN 3413 ENUMX 3414 BFD_RELOC_IP2K_HI8INSN 3415 ENUMDOC 3416 Scenix IP2K - low/high 8 bits of instruction word address 3417 ENUM 3418 BFD_RELOC_IP2K_PC_SKIP 3419 ENUMDOC 3420 Scenix IP2K - even/odd PC modifier to modify snb pcl.0 3421 ENUM 3422 BFD_RELOC_IP2K_TEXT 3423 ENUMDOC 3424 Scenix IP2K - 16 bit word address in text section. 3425 ENUM 3426 BFD_RELOC_IP2K_FR_OFFSET 3427 ENUMDOC 3428 Scenix IP2K - 7-bit sp or dp offset 3429 ENUM 3430 BFD_RELOC_VPE4KMATH_DATA 3431 ENUMX 3432 BFD_RELOC_VPE4KMATH_INSN 3433 ENUMDOC 3434 Scenix VPE4K coprocessor - data/insn-space addressing 2764 3435 2765 3436 ENUM … … 2861 3532 BFD_RELOC_IA64_LTOFF_FPTR64I 2862 3533 ENUMX 3534 BFD_RELOC_IA64_LTOFF_FPTR32MSB 3535 ENUMX 3536 BFD_RELOC_IA64_LTOFF_FPTR32LSB 3537 ENUMX 2863 3538 BFD_RELOC_IA64_LTOFF_FPTR64MSB 2864 3539 ENUMX … … 2903 3578 BFD_RELOC_IA64_COPY 2904 3579 ENUMX 3580 BFD_RELOC_IA64_LTOFF22X 3581 ENUMX 3582 BFD_RELOC_IA64_LDXMOV 3583 ENUMX 3584 BFD_RELOC_IA64_TPREL14 3585 ENUMX 2905 3586 BFD_RELOC_IA64_TPREL22 2906 3587 ENUMX 3588 BFD_RELOC_IA64_TPREL64I 3589 ENUMX 2907 3590 BFD_RELOC_IA64_TPREL64MSB 2908 3591 ENUMX 2909 3592 BFD_RELOC_IA64_TPREL64LSB 2910 3593 ENUMX 2911 BFD_RELOC_IA64_LTOFF_TP22 2912 ENUMX 2913 BFD_RELOC_IA64_LTOFF22X 2914 ENUMX 2915 BFD_RELOC_IA64_LDXMOV 3594 BFD_RELOC_IA64_LTOFF_TPREL22 3595 ENUMX 3596 BFD_RELOC_IA64_DTPMOD64MSB 3597 ENUMX 3598 BFD_RELOC_IA64_DTPMOD64LSB 3599 ENUMX 3600 BFD_RELOC_IA64_LTOFF_DTPMOD22 3601 ENUMX 3602 BFD_RELOC_IA64_DTPREL14 3603 ENUMX 3604 BFD_RELOC_IA64_DTPREL22 3605 ENUMX 3606 BFD_RELOC_IA64_DTPREL64I 3607 ENUMX 3608 BFD_RELOC_IA64_DTPREL32MSB 3609 ENUMX 3610 BFD_RELOC_IA64_DTPREL32LSB 3611 ENUMX 3612 BFD_RELOC_IA64_DTPREL64MSB 3613 ENUMX 3614 BFD_RELOC_IA64_DTPREL64LSB 3615 ENUMX 3616 BFD_RELOC_IA64_LTOFF_DTPREL22 2916 3617 ENUMDOC 2917 3618 Intel IA64 Relocations. … … 2921 3622 ENUMDOC 2922 3623 Motorola 68HC11 reloc. 2923 This is the 8 bit shigh part of an absolute address.3624 This is the 8 bit high part of an absolute address. 2924 3625 ENUM 2925 3626 BFD_RELOC_M68HC11_LO8 2926 3627 ENUMDOC 2927 3628 Motorola 68HC11 reloc. 2928 This is the 8 bit slow part of an absolute address.3629 This is the 8 bit low part of an absolute address. 2929 3630 ENUM 2930 3631 BFD_RELOC_M68HC11_3B 2931 3632 ENUMDOC 2932 3633 Motorola 68HC11 reloc. 2933 This is the 3 bits of a value. 3634 This is the 3 bit of a value. 3635 ENUM 3636 BFD_RELOC_M68HC11_RL_JUMP 3637 ENUMDOC 3638 Motorola 68HC11 reloc. 3639 This reloc marks the beginning of a jump/call instruction. 3640 It is used for linker relaxation to correctly identify beginning 3641 of instruction and change some branchs to use PC-relative 3642 addressing mode. 3643 ENUM 3644 BFD_RELOC_M68HC11_RL_GROUP 3645 ENUMDOC 3646 Motorola 68HC11 reloc. 3647 This reloc marks a group of several instructions that gcc generates 3648 and for which the linker relaxation pass can modify and/or remove 3649 some of them. 3650 ENUM 3651 BFD_RELOC_M68HC11_LO16 3652 ENUMDOC 3653 Motorola 68HC11 reloc. 3654 This is the 16-bit lower part of an address. It is used for 'call' 3655 instruction to specify the symbol address without any special 3656 transformation (due to memory bank window). 3657 ENUM 3658 BFD_RELOC_M68HC11_PAGE 3659 ENUMDOC 3660 Motorola 68HC11 reloc. 3661 This is a 8-bit reloc that specifies the page number of an address. 3662 It is used by 'call' instruction to specify the page number of 3663 the symbol. 3664 ENUM 3665 BFD_RELOC_M68HC11_24 3666 ENUMDOC 3667 Motorola 68HC11 reloc. 3668 This is a 24-bit reloc that represents the address with a 16-bit 3669 value and a 8-bit page number. The symbol address is transformed 3670 to follow the 16K memory bank of 68HC12 (seen as mapped in the window). 2934 3671 2935 3672 ENUM … … 2946 3683 These relocs are only used within the CRIS assembler. They are not 2947 3684 (at present) written to any object files. 3685 ENUM 3686 BFD_RELOC_CRIS_COPY 3687 ENUMX 3688 BFD_RELOC_CRIS_GLOB_DAT 3689 ENUMX 3690 BFD_RELOC_CRIS_JUMP_SLOT 3691 ENUMX 3692 BFD_RELOC_CRIS_RELATIVE 3693 ENUMDOC 3694 Relocs used in ELF shared libraries for CRIS. 3695 ENUM 3696 BFD_RELOC_CRIS_32_GOT 3697 ENUMDOC 3698 32-bit offset to symbol-entry within GOT. 3699 ENUM 3700 BFD_RELOC_CRIS_16_GOT 3701 ENUMDOC 3702 16-bit offset to symbol-entry within GOT. 3703 ENUM 3704 BFD_RELOC_CRIS_32_GOTPLT 3705 ENUMDOC 3706 32-bit offset to symbol-entry within GOT, with PLT handling. 3707 ENUM 3708 BFD_RELOC_CRIS_16_GOTPLT 3709 ENUMDOC 3710 16-bit offset to symbol-entry within GOT, with PLT handling. 3711 ENUM 3712 BFD_RELOC_CRIS_32_GOTREL 3713 ENUMDOC 3714 32-bit offset to symbol, relative to GOT. 3715 ENUM 3716 BFD_RELOC_CRIS_32_PLT_GOTREL 3717 ENUMDOC 3718 32-bit offset to symbol with PLT entry, relative to GOT. 3719 ENUM 3720 BFD_RELOC_CRIS_32_PLT_PCREL 3721 ENUMDOC 3722 32-bit offset to symbol with PLT entry, relative to this relocation. 2948 3723 2949 3724 ENUM … … 3013 3788 ENUMDOC 3014 3789 Intel i860 Relocations. 3790 3791 ENUM 3792 BFD_RELOC_OPENRISC_ABS_26 3793 ENUMX 3794 BFD_RELOC_OPENRISC_REL_26 3795 ENUMDOC 3796 OpenRISC Relocations. 3797 3798 ENUM 3799 BFD_RELOC_H8_DIR16A8 3800 ENUMX 3801 BFD_RELOC_H8_DIR16R8 3802 ENUMX 3803 BFD_RELOC_H8_DIR24A8 3804 ENUMX 3805 BFD_RELOC_H8_DIR24R8 3806 ENUMX 3807 BFD_RELOC_H8_DIR32A16 3808 ENUMDOC 3809 H8 elf Relocations. 3810 3811 ENUM 3812 BFD_RELOC_XSTORMY16_REL_12 3813 ENUMX 3814 BFD_RELOC_XSTORMY16_12 3815 ENUMX 3816 BFD_RELOC_XSTORMY16_24 3817 ENUMX 3818 BFD_RELOC_XSTORMY16_FPTR16 3819 ENUMDOC 3820 Sony Xstormy16 Relocations. 3821 3822 ENUM 3823 BFD_RELOC_VAX_GLOB_DAT 3824 ENUMX 3825 BFD_RELOC_VAX_JMP_SLOT 3826 ENUMX 3827 BFD_RELOC_VAX_RELATIVE 3828 ENUMDOC 3829 Relocations used by VAX ELF. 3830 3831 ENUM 3832 BFD_RELOC_MSP430_10_PCREL 3833 ENUMX 3834 BFD_RELOC_MSP430_16_PCREL 3835 ENUMX 3836 BFD_RELOC_MSP430_16 3837 ENUMX 3838 BFD_RELOC_MSP430_16_PCREL_BYTE 3839 ENUMX 3840 BFD_RELOC_MSP430_16_BYTE 3841 ENUMDOC 3842 msp430 specific relocation codes 3843 3844 ENUM 3845 BFD_RELOC_IQ2000_OFFSET_16 3846 ENUMX 3847 BFD_RELOC_IQ2000_OFFSET_21 3848 ENUMX 3849 BFD_RELOC_IQ2000_UHI16 3850 ENUMDOC 3851 IQ2000 Relocations. 3852 3853 ENUM 3854 BFD_RELOC_XTENSA_RTLD 3855 ENUMDOC 3856 Special Xtensa relocation used only by PLT entries in ELF shared 3857 objects to indicate that the runtime linker should set the value 3858 to one of its own internal functions or data structures. 3859 ENUM 3860 BFD_RELOC_XTENSA_GLOB_DAT 3861 ENUMX 3862 BFD_RELOC_XTENSA_JMP_SLOT 3863 ENUMX 3864 BFD_RELOC_XTENSA_RELATIVE 3865 ENUMDOC 3866 Xtensa relocations for ELF shared objects. 3867 ENUM 3868 BFD_RELOC_XTENSA_PLT 3869 ENUMDOC 3870 Xtensa relocation used in ELF object files for symbols that may require 3871 PLT entries. Otherwise, this is just a generic 32-bit relocation. 3872 ENUM 3873 BFD_RELOC_XTENSA_OP0 3874 ENUMX 3875 BFD_RELOC_XTENSA_OP1 3876 ENUMX 3877 BFD_RELOC_XTENSA_OP2 3878 ENUMDOC 3879 Generic Xtensa relocations. Only the operand number is encoded 3880 in the relocation. The details are determined by extracting the 3881 instruction opcode. 3882 ENUM 3883 BFD_RELOC_XTENSA_ASM_EXPAND 3884 ENUMDOC 3885 Xtensa relocation to mark that the assembler expanded the 3886 instructions from an original target. The expansion size is 3887 encoded in the reloc size. 3888 ENUM 3889 BFD_RELOC_XTENSA_ASM_SIMPLIFY 3890 ENUMDOC 3891 Xtensa relocation to mark that the linker should simplify 3892 assembler-expanded instructions. This is commonly used 3893 internally by the linker after analysis of a 3894 BFD_RELOC_XTENSA_ASM_EXPAND. 3015 3895 3016 3896 ENDSENUM … … 3045 3925 3046 3926 static reloc_howto_type bfd_howto_32 = 3047 HOWTO (0, 00, 2, 32, false, 0, complain_overflow_bitfield, 0, "VRT32", false, 0xffffffff, 0xffffffff, true);3927 HOWTO (0, 00, 2, 32, FALSE, 0, complain_overflow_bitfield, 0, "VRT32", FALSE, 0xffffffff, 0xffffffff, TRUE); 3048 3928 3049 3929 /* … … 3103 3983 bfd_reloc_code_real_type code; 3104 3984 { 3105 if ( code >BFD_RELOC_UNUSED)3985 if ((int) code > (int) BFD_RELOC_UNUSED) 3106 3986 return 0; 3107 3987 return bfd_reloc_code_real_names[(int)code]; … … 3113 3993 3114 3994 SYNOPSIS 3115 b oolean bfd_generic_relax_section3995 bfd_boolean bfd_generic_relax_section 3116 3996 (bfd *abfd, 3117 3997 asection *section, 3118 3998 struct bfd_link_info *, 3119 b oolean *);3999 bfd_boolean *); 3120 4000 3121 4001 DESCRIPTION … … 3124 4004 */ 3125 4005 3126 /*ARGSUSED*/ 3127 boolean 4006 bfd_boolean 3128 4007 bfd_generic_relax_section (abfd, section, link_info, again) 3129 4008 bfd *abfd ATTRIBUTE_UNUSED; 3130 4009 asection *section ATTRIBUTE_UNUSED; 3131 4010 struct bfd_link_info *link_info ATTRIBUTE_UNUSED; 3132 b oolean *again;4011 bfd_boolean *again; 3133 4012 { 3134 *again = false;3135 return true;4013 *again = FALSE; 4014 return TRUE; 3136 4015 } 3137 4016 … … 3141 4020 3142 4021 SYNOPSIS 3143 b oolean bfd_generic_gc_sections4022 bfd_boolean bfd_generic_gc_sections 3144 4023 (bfd *, struct bfd_link_info *); 3145 4024 … … 3149 4028 */ 3150 4029 3151 /*ARGSUSED*/ 3152 boolean 4030 bfd_boolean 3153 4031 bfd_generic_gc_sections (abfd, link_info) 3154 4032 bfd *abfd ATTRIBUTE_UNUSED; 3155 4033 struct bfd_link_info *link_info ATTRIBUTE_UNUSED; 3156 4034 { 3157 return true; 4035 return TRUE; 4036 } 4037 4038 /* 4039 INTERNAL_FUNCTION 4040 bfd_generic_merge_sections 4041 4042 SYNOPSIS 4043 bfd_boolean bfd_generic_merge_sections 4044 (bfd *, struct bfd_link_info *); 4045 4046 DESCRIPTION 4047 Provides default handling for SEC_MERGE section merging for back ends 4048 which don't have SEC_MERGE support -- i.e., does nothing. 4049 */ 4050 4051 bfd_boolean 4052 bfd_generic_merge_sections (abfd, link_info) 4053 bfd *abfd ATTRIBUTE_UNUSED; 4054 struct bfd_link_info *link_info ATTRIBUTE_UNUSED; 4055 { 4056 return TRUE; 3158 4057 } 3159 4058 … … 3168 4067 struct bfd_link_order *link_order, 3169 4068 bfd_byte *data, 3170 b oolean relocateable,4069 bfd_boolean relocateable, 3171 4070 asymbol **symbols); 3172 4071 … … 3184 4083 struct bfd_link_order *link_order; 3185 4084 bfd_byte *data; 3186 b oolean relocateable;4085 bfd_boolean relocateable; 3187 4086 asymbol **symbols; 3188 4087 { 3189 /* Get enough memory to hold the stuff */4088 /* Get enough memory to hold the stuff. */ 3190 4089 bfd *input_bfd = link_order->u.indirect.section->owner; 3191 4090 asection *input_section = link_order->u.indirect.section; … … 3198 4097 goto error_return; 3199 4098 3200 reloc_vector = (arelent **) bfd_malloc (( size_t) reloc_size);4099 reloc_vector = (arelent **) bfd_malloc ((bfd_size_type) reloc_size); 3201 4100 if (reloc_vector == NULL && reloc_size != 0) 3202 4101 goto error_return; 3203 4102 3204 /* read in the section*/4103 /* Read in the section. */ 3205 4104 if (!bfd_get_section_contents (input_bfd, 3206 4105 input_section, 3207 4106 (PTR) data, 3208 0,4107 (bfd_vma) 0, 3209 4108 input_section->_raw_size)) 3210 4109 goto error_return; 3211 4110 3212 /* We're not relaxing the section, so just copy the size info */4111 /* We're not relaxing the section, so just copy the size info. */ 3213 4112 input_section->_cooked_size = input_section->_raw_size; 3214 input_section->reloc_done = true;4113 input_section->reloc_done = TRUE; 3215 4114 3216 4115 reloc_count = bfd_canonicalize_reloc (input_bfd, … … 3240 4139 asection *os = input_section->output_section; 3241 4140 3242 /* A partial link, so keep the relocs */4141 /* A partial link, so keep the relocs. */ 3243 4142 os->orelocation[os->reloc_count] = *parent; 3244 4143 os->reloc_count++; … … 3253 4152 (link_info, bfd_asymbol_name (*(*parent)->sym_ptr_ptr), 3254 4153 input_bfd, input_section, (*parent)->address, 3255 true)))4154 TRUE))) 3256 4155 goto error_return; 3257 4156 break; -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.