diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2014-04-08 10:59:43 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2014-04-08 10:59:43 +0100 |
commit | 61e2488cd8497d158303a78563ad40f51f5c3f8e (patch) | |
tree | 096a515807bb59268398b4dd879929e93f78fec3 /ld/testsuite | |
parent | ae1d276159c3cfb29caacdf567aea01f433f78b0 (diff) | |
download | gdb-61e2488cd8497d158303a78563ad40f51f5c3f8e.zip gdb-61e2488cd8497d158303a78563ad40f51f5c3f8e.tar.gz gdb-61e2488cd8497d158303a78563ad40f51f5c3f8e.tar.bz2 |
Add support for generating and inserting build IDs into COFF binaries.
* peXXigen.c (pe_print_debugdata): New function: Displays the
contents of the debug directory and decodes codeview entries.
(_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
(_bfd_XXi_slurp_codeview_record, _bfd_XXi_write_codeview_record):
Add functions for reading and writing debugdir and codeview
records.
* libpei.h (_bfd_XXi_swap_debugdir_in, _bfd_XXi_swap_debugdir_out)
(_bfd_XXi_write_codeview_record): Add prototypes and macros.
* libcoff-in.h (pe_tdata): Add build-id data.
* libcoff.h: Regenerate.
* coffcode.h (coff_write_object_contents): Run build_id
after_write_object_contents hook.
* pe.h (external_IMAGE_DEBUG_DIRECTORY, _CV_INFO_PDB70)
(_CV_INFO_PDB20): Add structures and constants for debug directory
and codeview records.
* internal.h (internal_IMAGE_DEBUG_DIRECTORY, CODEVIEW_INFO):
Add structures and constants for internal representation of debug
directory and codeview records.
* emultempl/elf32.em (id_note_section_size, read_hex, write_build_id):
Move code for parsing build-id option and calculating the build-id to...
* ldbuildid.c: New file.
* ldbuildid.h: New file.
* Makefile.am (CFILES, HFILES, OFILES, ld_new_SOURCES): Add new
files.
* Makefile.in: Regenerate.
* ld.texinfo: Update --build-id description to mention COFF
support.
* NEWS: Mention support for COFF build ids.
* emultempl/pe.em (gld${EMULATION_NAME}_handle_option):
(pecoff_checksum_contents, write_build_id, setup_build_id)
(gld_${EMULATION_NAME}_after_open): Handle and implement
build-id option.
* emultempl/pep.em: Likewise.
Diffstat (limited to 'ld/testsuite')
-rw-r--r-- | ld/testsuite/ld-pe/longsecn-3.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/longsecn-4.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/longsecn-5.d | 3 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/non-c-lang-syms.s | 1 | ||||
-rw-r--r-- | ld/testsuite/ld-pe/orphana_nu.s | 2 |
5 files changed, 5 insertions, 7 deletions
diff --git a/ld/testsuite/ld-pe/longsecn-3.d b/ld/testsuite/ld-pe/longsecn-3.d index 0317be3..c86a828 100644 --- a/ld/testsuite/ld-pe/longsecn-3.d +++ b/ld/testsuite/ld-pe/longsecn-3.d @@ -37,5 +37,4 @@ Idx Name Size VMA +LMA +File off Algn CONTENTS, ALLOC, LOAD, DATA 14 \.rodata\.very\.long\.section\$1234 [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ 2\*\*[0-9] CONTENTS, ALLOC, LOAD, DATA - 15 \.(bss |text) [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ 2\*\*[0-9] - (ALLOC|CONTENTS, ALLOC, LOAD, (READONLY, )?CODE) +#... diff --git a/ld/testsuite/ld-pe/longsecn-4.d b/ld/testsuite/ld-pe/longsecn-4.d index 565ef38..e326d98 100644 --- a/ld/testsuite/ld-pe/longsecn-4.d +++ b/ld/testsuite/ld-pe/longsecn-4.d @@ -37,5 +37,4 @@ Idx Name Size VMA +LMA +File off Algn CONTENTS, ALLOC, LOAD, DATA 14 \.rodata\. [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ 2\*\*[0-9] CONTENTS, ALLOC, LOAD, DATA - 15 \.(bss |text) [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ 2\*\*[0-9] - (ALLOC|CONTENTS, ALLOC, LOAD, (READONLY, )?CODE) +#... diff --git a/ld/testsuite/ld-pe/longsecn-5.d b/ld/testsuite/ld-pe/longsecn-5.d index 82d94b8..f3ef22b 100644 --- a/ld/testsuite/ld-pe/longsecn-5.d +++ b/ld/testsuite/ld-pe/longsecn-5.d @@ -37,5 +37,4 @@ Idx Name Size VMA +LMA +File off Algn CONTENTS, ALLOC, LOAD, DATA 14 \.rodata\.very\.long\.section\$1234 [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ 2\*\*[0-9] CONTENTS, ALLOC, LOAD, DATA - 15 \.(bss |text) [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ [0-9a-fA-F]+ 2\*\*[0-9] - (ALLOC|CONTENTS, ALLOC, LOAD, (READONLY, )?CODE) +#... diff --git a/ld/testsuite/ld-pe/non-c-lang-syms.s b/ld/testsuite/ld-pe/non-c-lang-syms.s index e849d9e..28006a1 100644 --- a/ld/testsuite/ld-pe/non-c-lang-syms.s +++ b/ld/testsuite/ld-pe/non-c-lang-syms.s @@ -1,4 +1,3 @@ - main: _main: nop diff --git a/ld/testsuite/ld-pe/orphana_nu.s b/ld/testsuite/ld-pe/orphana_nu.s index d3c564f..618789c 100644 --- a/ld/testsuite/ld-pe/orphana_nu.s +++ b/ld/testsuite/ld-pe/orphana_nu.s @@ -1,6 +1,8 @@ + .globl _mainCRTStartup .globl mainCRTStartup .globl start .text +_mainCRTStartup: mainCRTStartup: start: |