Skip to content

vikmik/dwarf-relocation-golang-bug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a standalone repro case for golang/go#40879

  • testdata contains logic to build 2 executables, bad and good.
    • They both have a CU DIE that uses DW_AT_ranges (to force this, I used a linker script to spread the code across 2 sections at different addresses)
    • bad has a .rela.debug_ranges section (it is linked with --emit-relocs)
  • main.go contains logic that prints the PC ranges of a binary.
  • test.sh will print the PC ranges using both the Go binary, and llvm-dwarfdump, to highlight the difference
  • make will compile all binaries and run test.sh on both good and bad, highlighting the difference.

Note: you need llvm installed (for llvm-dwarfdump). Alternatively you can change the test.sh script to use the regular dwarfdump.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published