https://sourceware.org/bugzilla/show_bug.cgi?id=29077
Bug ID: 29077 Summary: RISCV: .align directive disables secondary relaxations Product: binutils Version: 2.38 Status: UNCONFIRMED Severity: normal Priority: P2 Component: ld Assignee: unassigned at sourceware dot org Reporter: patrick at rivosinc dot com Target Milestone: --- Adding a .align directive to an assembly file disables relaxations that are enabled by other relaxations: .text foo: jr ra .zero 1048560 bar: jr ra .globl _start _start: call bar call foo jr ra .align 3 With .align 3: Disassembly of section .text: 00000000000100b0 <foo>: 100b0: 00008067 ret ... 00000000001100a4 <bar>: 1100a4: 00008067 ret 00000000001100a8 <_start>: 1100a8: ffdff0ef jal ra,1100a4 <bar> 1100ac: fff00097 auipc ra,0xfff00 1100b0: 004080e7 jalr 4(ra) # 100b0 <foo> 1100b4: 00008067 ret Without .align 3: Disassembly of section .text: 00000000000100b0 <foo>: 100b0: 00008067 ret ... 00000000001100a4 <bar>: 1100a4: 00008067 ret 00000000001100a8 <_start>: 1100a8: ffdff0ef jal ra,1100a4 <bar> 1100ac: 804000ef jal ra,100b0 <foo> 1100b0: 00008067 ret -- You are receiving this mail because: You are on the CC list for the bug.