llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[BOLT][AArch64] Missing support for DWARF v5 forms and opcodes (DW_FORM_ref_udata, DW_OP_regval_type)

Open not4juu opened this issue 8 months ago • 2 comments

I am processing an AArch64 shared library (.so) compiled with GCC, using DWARF-5 (32-bit DWARF) debug information. I am running llvm-bolt (version 23.0.0, built from the latest main branch as of last week) with the --update-debug-sections option.

BOLT-WARNING: [internal-dwarf-error]: unsupported DW_OP encoding BOLT-WARNING: [internal-dwarf-error]: unsupported attribute form DW_FORM_ref_udata in cloneAttribute.

The second warning appears to be related to a missing implementation in BOLT, specifically in: https://github.com/llvm/llvm-project/blob/main/bolt/lib/Core/DIEBuilder.cpp#L887

For the first warning, I instrumented the code by printing the decoded opcode: https://github.com/llvm/llvm-project/blob/main/bolt/lib/Core/DIEBuilder.cpp#L712

BOLT-WARNING: [internal-dwarf-error]: unsupported DW_OP (DW_OP_regval_type 0xa5) encoding

Questions:

  1. Are these issues already known/reported?
  2. Are these warnings generally accepted in BOLT and considered for DWARF-5 alignment?
  3. If so, is there an expected timeline for their implementation or adaptation for DWARF-5?

Thank you in advance for your time

Note: Falling back to DWARF-4 is not a viable option in my case.

not4juu avatar Mar 24 '26 13:03 not4juu

@llvm/issue-subscribers-bolt

Author: Sebastian (not4juu)

I am processing an AArch64 shared library (.so) compiled with GCC, using DWARF-5 (32-bit DWARF) debug information. I am running llvm-bolt (version 23.0.0, built from the latest main branch as of last week) with the --update-debug-sections option.

BOLT-WARNING: [internal-dwarf-error]: unsupported DW_OP encoding BOLT-WARNING: [internal-dwarf-error]: unsupported attribute form DW_FORM_ref_udata in cloneAttribute.

The second warning appears to be related to a missing implementation in BOLT, specifically in: https://github.com/llvm/llvm-project/blob/main/bolt/lib/Core/DIEBuilder.cpp#L887

For the first warning, I instrumented the code by printing the decoded opcode: https://github.com/llvm/llvm-project/blob/main/bolt/lib/Core/DIEBuilder.cpp#L712

BOLT-WARNING: [internal-dwarf-error]: unsupported DW_OP (DW_OP_regval_type 0xa5) encoding

Questions:

  1. Are these issues already known/reported?
  2. Are these warnings generally accepted in BOLT and considered for DWARF-5 alignment?
  3. If so, is there an expected timeline for their implementation or adaptation for DWARF-5?

Thank you in advance for your time

Note: Falling back to DWARF-4 is not a viable option in my case.

llvmbot avatar Mar 24 '26 13:03 llvmbot

Hey folks,

This issue was recently brought to my attention. Has anyone started working on it, or do we have plans to fill this gap?

Thanks!

(cc: @maksfb, @ayermolo)

paschalis-mpeis avatar Apr 23 '26 09:04 paschalis-mpeis