Skip to content

Commit

Permalink
Add test program and artifact covering basic LoongArch relocations
Browse files Browse the repository at this point in the history
Signed-off-by: WANG Xuerui <xen0n@gentoo.org>
  • Loading branch information
xen0n committed Sep 4, 2023
1 parent 30aedff commit c181bde
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/testfiles_for_readelf/loongarch-relocs.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* This source was compiled for LoongArch64.
loongarch64-unknown-linux-gnu-gcc -c -o loongarch64-relocs.o.elf loongarch-relocs.c -g
Upstream support for LoongArch32 is not yet mature, so it is not covered.
*/

extern struct {
int i, j;
} data;

extern int bar (void);

int
foo (int a)
{
data.i += a;
data.j -= bar();
return 0;
}
Binary file not shown.

0 comments on commit c181bde

Please sign in to comment.