https://sourceware.org/bugzilla/show_bug.cgi?id=28955
Bug ID: 28955 Summary: [mips] gas segfault when assembling a simple binary Product: binutils Version: 2.38 Status: UNCONFIRMED Severity: normal Priority: P2 Component: gas Assignee: unassigned at sourceware dot org Reporter: ochi12 at hotmail dot com Target Milestone: --- # Environment: I'm using Ubuntu 20.04.1 on amd64. I've built the last release of binutils using the toolchain available on Canonical's repos. # Description: GAS segfaults when trying to assemble the following file: ``` .global __start .section .text __start: jal 0x8011557c ``` the corresponding command and its output looks like this: ``` $ mips-linux-gnu-as -EB -mips32r2 -O1 -mabi=32 -march=mips32r2 -mfpxx -mno-shared -KPIC -o /tmp/ccPzROEz.o main.s main.s: Assembler messages: main.s:6: Warning: no .cprestore pseudo-op used in PIC code main.s: Internal error (Segmentation fault). Please report this bug. ``` The reason I'm passing all those arguments is because that's the way that `gcc` invokes `as` in order to compile it if one just executes `mips-linux-gnu-gcc main.s`. This means that this crash occurs even when one invokes `gcc`, and not `as` directly. I've first noticed this bug on binutils 2.34, which is the version available on Canonical's repos. Then I've compiled the latest release like so: ``` export PREFIX="$HOME/opt/cross" export TARGET=mips-linux-gnu export PATH="$PREFIX/bin:$PATH" ../binutils-2.38/configure --target=$TARGET --prefix="$PREFIX" --with-sysroot --disable-nls --disable-werror make make install ``` tested it again and got the same results. -- You are receiving this mail because: You are on the CC list for the bug.