Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.text
.globl foo
.type foo, @function
call norelax
call norelax
call norelax
call norelax
.option rvc
j 1f
.option norvc
.balign 32
foo: nop
// Add a relaxation relocation as RISC-V ABI demands that R_ALIGN
Expand All @@ -16,4 +15,5 @@ foo: nop
ret
.size foo, .-foo

.equ norelax, 0x40000000
1:
nop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
SECTIONS {
text (0xFE1) : {
text (0x0) : {
*(.text)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#----------InsufficientAlignmentRelaxation.test----------------- Executable------------------#
# BEGIN_COMMENT
# This test checks that the linker correctly emits insufficient bytes for alignment
# relaxation error.
# END_COMMENT
# START_TEST
RUN: %clang %clangopts -c %p/Inputs/1.s -o %t.1.o
RUN: %objdump -dr %t.1.o
RUN: %not %link %linkopts -o %t.1.out %t.1.o -T %p/Inputs/1.t 2>&1 | %filecheck %s
# END_TEST

CHECK: Error: Insufficient number of spare bytes for alignment relaxation: present 28, needed 30 in section .text+0x20 file {{.*}}1.o

This file was deleted.

Loading