[Lldb-commits] [PATCH] D32899: [RuntimeDyld] Fix debug section relocation (pr20457)

Lang Hames via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sun May 7 10:43:00 PDT 2017


lhames requested changes to this revision.
lhames added a comment.
This revision now requires changes to proceed.

Hi Pavel,

This should be an llvm-rtdyld lit test (the unit-test is impressive, but this is RuntimeDyld specific so llvm-rtdyld is more appropriate). I've modified llvm-rtdyld and RuntimeDyldChecker in r302372 to make it possible to test this:

  # RUN: llvm-mc -triple=x86_64-pc-linux -filetype=obj -o %T/ELF_x86-64_debug_frame.o %s
  # RUN: llvm-rtdyld -triple=x86_64-pc-linux -verify -check=%s %T/ELF_x86-64_debug_frame.o
  
          .text
          .file   "debug_frame_test.c"
          .align  16, 0x90
          .type   foo, at function
  foo:
          .cfi_startproc
          retq
  .Ltmp0:
          .size   foo, .Ltmp0-foo
          .cfi_endproc
          .cfi_sections .debug_frame
  
  # Check that .debug_frame is mapped to 0.
  # rtdyld-check: section_addr(ELF_x86-64_debug_frame.o, .debug_frame) = 0
  
  # Check that The relocated FDE's CIE offset also points to zero.
  # rtdyld-check: *{4}(section_addr(ELF_x86-64_debug_frame.o, .debug_frame) + 0x1C) = 0

This should be added as llvm/test/ExecutionEngine/RuntimeDyld/X86/ELF_x86-64_debug_frame.s, replacing the unit test.

Cheers,
Lang.


https://reviews.llvm.org/D32899





More information about the lldb-commits mailing list