https://sourceware.org/bugzilla/show_bug.cgi?id=33236

mengqinggang <mengqinggang at loongson dot cn> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mengqinggang at loongson dot cn

--- Comment #4 from mengqinggang <mengqinggang at loongson dot cn> ---
Change b.s to:
  1 # Assembler will not generate R_RISCV_ALIGN here
  2 .balign 4
  3 .option push
  4 .option norelax
  5 nop
  6 .balign 8
  7 b0:
  8   .word 0x3a393837
  9 .option pop

The .word 0x3a393837 data in b.o still may end up unaligned in the final
executable.

It may caused by the follow code:
    bool hasAlignRel = llvm::any_of(rels, [](const RelTy &rel) {
      return rel.r_offset == 0 && rel.getType(false) == R_RISCV_ALIGN;
    });
    if (!hasAlignRel) {
      synthesizedAligns.emplace_back(dot - baseSec->getVA(),
                                     sec->addralign - 2);
      dot += sec->addralign - 2;
      return true;
    }

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Reply via email to