Skip to content
This repository has been archived by the owner on Aug 17, 2022. It is now read-only.

Commit

Permalink
Disable relaxation in the presence of .cfi directives
Browse files Browse the repository at this point in the history
The GAS internals perform intra-section label subtractions, which
conflict with our linker relaxations.  So don't relax when emitting
them.

GCC can emit DWARF directly, so this doesn't actually prevent
relaxation in the common case.
  • Loading branch information
aswaterman committed Nov 4, 2016
1 parent c32df47 commit 2dfac04
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gas/config/tc-riscv.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,6 +2408,10 @@ RISC-V options:\n\
void
riscv_cfi_frame_initial_instructions (void)
{
/* The generic DWARF code assumes that intra-section labels can be
subtracted at assembly time, which precludes relaxation. */
riscv_opts.relax = 0;

cfi_add_CFA_def_cfa_register (X_SP);
}

Expand Down

0 comments on commit 2dfac04

Please sign in to comment.