diff options
author | Tristan Gingold <gingold@adacore.com> | 2010-01-13 11:35:19 +0000 |
---|---|---|
committer | Tristan Gingold <gingold@adacore.com> | 2010-01-13 11:35:19 +0000 |
commit | f88af2f152042ac1f2a687bbf49a0b0b140c5b7a (patch) | |
tree | dad90f8b0443531a64b6f22bfa34f2d48144d7f0 /bfd | |
parent | fd3a68167e6b986751558ca54fa46f4a18fb5228 (diff) | |
download | gdb-f88af2f152042ac1f2a687bbf49a0b0b140c5b7a.zip gdb-f88af2f152042ac1f2a687bbf49a0b0b140c5b7a.tar.gz gdb-f88af2f152042ac1f2a687bbf49a0b0b140c5b7a.tar.bz2 |
2010-01-13 Tristan Gingold <gingold@adacore.com>
* reloc.c: Add MACH_O_X86_64 relocations.
* bfd-in2.h: Regenerate.
* libbfd.h: Regenerate.
Diffstat (limited to 'bfd')
-rw-r--r-- | bfd/ChangeLog | 6 | ||||
-rw-r--r-- | bfd/bfd-in2.h | 29 | ||||
-rw-r--r-- | bfd/libbfd.h | 9 | ||||
-rw-r--r-- | bfd/reloc.c | 47 |
4 files changed, 85 insertions, 6 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 8c397c3..b70e934 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,5 +1,11 @@ 2010-01-13 Tristan Gingold <gingold@adacore.com> + * reloc.c: Add MACH_O_X86_64 relocations. + * bfd-in2.h: Regenerate. + * libbfd.h: Regenerate. + +2010-01-13 Tristan Gingold <gingold@adacore.com> + * archive.c (normalize): Use lbasename. (bfd_bsd_truncate_arname): Ditto. (bfd_gnu_truncate_arname): Ditto. diff --git a/bfd/bfd-in2.h b/bfd/bfd-in2.h index 447f787..b17f2e1 100644 --- a/bfd/bfd-in2.h +++ b/bfd/bfd-in2.h @@ -4563,9 +4563,36 @@ BFD_RELOC_XTENSA_ASM_EXPAND. */ BFD_RELOC_MACH_O_PAIR. */ BFD_RELOC_MACH_O_SECTDIFF, -/* Mach-O generic relocations. */ +/* Pair of relocation. Contains the first symbol. */ BFD_RELOC_MACH_O_PAIR, +/* PCREL relocations. They are marked as branch to create PLT entry if +required. */ + BFD_RELOC_MACH_O_X86_64_BRANCH32, + BFD_RELOC_MACH_O_X86_64_BRANCH8, + +/* Used when referencing a GOT entry. */ + BFD_RELOC_MACH_O_X86_64_GOT, + +/* Used when loading a GOT entry with movq. It is specially marked so that +the linker could optimize the movq to a leaq if possible. */ + BFD_RELOC_MACH_O_X86_64_GOT_LOAD, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32, + +/* Symbol will be substracted. Must be followed by a BFD_RELOC_64. */ + BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64, + +/* Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_1, + +/* Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_2, + +/* Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. */ + BFD_RELOC_MACH_O_X86_64_PCREL32_4, + /* This is a 32 bit reloc for the microblaze that stores the low 16 bits of a value */ BFD_RELOC_MICROBLAZE_32_LO, diff --git a/bfd/libbfd.h b/bfd/libbfd.h index 8146ef9..073086c 100644 --- a/bfd/libbfd.h +++ b/bfd/libbfd.h @@ -2103,6 +2103,15 @@ static const char *const bfd_reloc_code_real_names[] = { "@@uninitialized@@", "BFD_RELOC_LM32_RELATIVE", "BFD_RELOC_MACH_O_SECTDIFF", "BFD_RELOC_MACH_O_PAIR", + "BFD_RELOC_MACH_O_X86_64_BRANCH32", + "BFD_RELOC_MACH_O_X86_64_BRANCH8", + "BFD_RELOC_MACH_O_X86_64_GOT", + "BFD_RELOC_MACH_O_X86_64_GOT_LOAD", + "BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32", + "BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64", + "BFD_RELOC_MACH_O_X86_64_PCREL32_1", + "BFD_RELOC_MACH_O_X86_64_PCREL32_2", + "BFD_RELOC_MACH_O_X86_64_PCREL32_4", "BFD_RELOC_MICROBLAZE_32_LO", "BFD_RELOC_MICROBLAZE_32_LO_PCREL", "BFD_RELOC_MICROBLAZE_32_ROSDA", diff --git a/bfd/reloc.c b/bfd/reloc.c index 0ea7a85..9451740 100644 --- a/bfd/reloc.c +++ b/bfd/reloc.c @@ -5235,14 +5235,51 @@ ENUMDOC Lattice Mico32 relocations. ENUM - BFD_RELOC_MACH_O_SECTDIFF + BFD_RELOC_MACH_O_SECTDIFF ENUMDOC - Difference between two section addreses. Must be followed by a - BFD_RELOC_MACH_O_PAIR. + Difference between two section addreses. Must be followed by a + BFD_RELOC_MACH_O_PAIR. ENUM - BFD_RELOC_MACH_O_PAIR + BFD_RELOC_MACH_O_PAIR ENUMDOC - Mach-O generic relocations. + Pair of relocation. Contains the first symbol. + +ENUM + BFD_RELOC_MACH_O_X86_64_BRANCH32 +ENUMX + BFD_RELOC_MACH_O_X86_64_BRANCH8 +ENUMDOC + PCREL relocations. They are marked as branch to create PLT entry if + required. +ENUM + BFD_RELOC_MACH_O_X86_64_GOT +ENUMDOC + Used when referencing a GOT entry. +ENUM + BFD_RELOC_MACH_O_X86_64_GOT_LOAD +ENUMDOC + Used when loading a GOT entry with movq. It is specially marked so that + the linker could optimize the movq to a leaq if possible. +ENUM + BFD_RELOC_MACH_O_X86_64_SUBTRACTOR32 +ENUMDOC + Symbol will be substracted. Must be followed by a BFD_RELOC_64. +ENUM + BFD_RELOC_MACH_O_X86_64_SUBTRACTOR64 +ENUMDOC + Symbol will be substracted. Must be followed by a BFD_RELOC_64. +ENUM + BFD_RELOC_MACH_O_X86_64_PCREL32_1 +ENUMDOC + Same as BFD_RELOC_32_PCREL but with an implicit -1 addend. +ENUM + BFD_RELOC_MACH_O_X86_64_PCREL32_2 +ENUMDOC + Same as BFD_RELOC_32_PCREL but with an implicit -2 addend. +ENUM + BFD_RELOC_MACH_O_X86_64_PCREL32_4 +ENUMDOC + Same as BFD_RELOC_32_PCREL but with an implicit -4 addend. ENUM BFD_RELOC_MICROBLAZE_32_LO |