| Age | Commit message (Collapse) | Author | Files | Lines |
|
* benchmarks: illegal addend for R_RISCV_GOT_HI20 in crt.S
With Ubuntu's GCC 15.2.0-7ubuntu1 building results in an error:
/tmp/ccfCpSVm.o: in function `_start':
(.text.init+0x100): dangerous relocation:
The addend isn't allowed for R_RISCV_GOT_HI20
Split loading _end + 63 into register tp into separate load and add
instructions.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
only describes R_RISCV_GOT_HI20 with offset 0 to a label.
The topic of addends for R_RISCV_GOT_HI20 was discussed in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* isa/rv64mi/illegal.S: illegal addend for R_RISCV_GOT_HI20
With Ubuntu's GCC 15.2.0-7ubuntu1 building results in an error:
rv64mi-p-illegal-illegal.o: in function `reset_vector':
(.text.init+0x1dc): dangerous relocation:
The addend isn't allowed for R_RISCV_GOT_HI20
Split loading mtvec_handler + 1 into register t into separate load and add
instructions.
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-elf.adoc
only describes R_RISCV_GOT_HI20 with offset 0 to a label.
The topic of addends for R_RISCV_GOT_HI20 was discussed in
https://github.com/riscv-non-isa/riscv-elf-psabi-doc/issues/184#issuecomment-830988778
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---------
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
When building with Ubuntu's gcc 15.2.0-7ubuntu1 an error occurs:
undefined reference to `__printf_chk'
This is due to _FORTIFY_SOURCE being set by the toolchain defaults.
Undefine the symbol.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
Building leads to a warning
riscv64-linux-gnu/bin/ld: warning:
median.riscv has a LOAD segment with RWX permissions
The text sections should we RX only.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
* benchmark: correct tohost, fromhost symbol size
Running on the spike virtual machine
qemu-system-riscv64 -M spike -nographic -bios none \
-kernel benchmarks/qsort.riscv
fails with
qemu-system-riscv64: HTIF tohost must be 8 bytes
because the symbol size if the ELF file is 0.
Move the symbols tohost and fromhost to C code.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
* syscalls: QEMU only implements HTIF_CONSOLE_CMD_PUTC
The only console output syscall emulated by QEMU 10.2 via the HTIF
interface is writing a single character. String output is not available.
Rewrite printstr() as a loop using HTIF_CONSOLE_CMD_PUTC.
Rewrite putchar() using HTIF_CONSOLE_CMD_PUTC.
With this change the benchmarks provide output on the Spike virtual
machine:
$ qemu-system-riscv64 -M spike -nographic -bios none \
-kernel benchmarks/qsort.riscv
mcycle = 752216
minstret = 749734
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
---------
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
Building benchmarks/common/syscalls.c results in a warning:
warning: format ‘%d’ expects argument of type ‘int’, but argument 4
has type ‘uintptr_t’ {aka ‘long unsigned int’} [-Wformat=]
118 | pbuf += sprintf(pbuf, "%s = %d\n", counter_names[i], counters[i]);
| ~^ ~~~~~~~~~~~
| | |
| int uintptr_t {aka long unsigned int}
Use %lu for to print uintptr_t.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
|
|
|
|
Dhrystone which are non-fatal warnings in GCC 13 but fatal errors in GCC 14 (#587)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Related to issue https://github.com/riscv-software-src/riscv-tests/issues/453
It seems to be the only modification needed there.
It may break backward compatibility with (very?) old compilers.
Signed-off-by: Pascal Cotret <pascal.cotret@gmail.com>
|
|
The source of benchmarks' Makefile does not use fragments anymore. This commit removes the mention of them from the readme.
Signed-off-by: Mehmet Oguz Derin <mehmetoguzderin@mehmetoguzderin.com>
|
|
Otherwise, we get infinite recursion.
Resolves #321
Resolves #322
|
|
|
|
bus/hardware device (#274)
|
|
the same size of stack & TLS. (#242)
|
|
|
|
The symbols used to query the size of .tdata and .tbss need not be
thread-local themselves; instead, make them linker script-provided
non-thread-local symbols.
|
|
|
|
|
|
|
|
|
|
|
|
Make the page-crossing instruction non-idempotent to detect erroneously
executing the first 16 bits of the instruction with garbage MSBs.
|
|
|
|
|
|
|
|
I've added an additional linker relaxation that relaxes two instruction
pc-relative sequences to one instruction gp relative sequences when
possible. This sequence now optimizes the initial gp generation to
mv gp, gp
which is obviously bogus. The fix is to disable relaxations when
setting up gp, preventing the linker from relaxing away this setup code.
|
|
This changed a while ago in binutils.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This is a pattern GCC should pick up for targets where AMOADD is faster
than LW/ADD/SW.
|