Commit 9a4e806a authored by Jim Wilson's avatar Jim Wilson Committed by Kito Cheng
Browse files

RISC-V: Don't check ABI flags if no code section.

This fixes a glib build failure reported in PR 24389.  Using ld -b binary
creates an object file with no elf header flags set which has the wrong ABI
info for riscv64-linux.  But the file also has no code sections, so I added
code borrowed from the arm port that only checks the ELF header ABI flags if
there is a code section.

	bfd/
	PR 24389
	* elfnn-riscv.c (_bfd_riscv_elf_merge_private_bfd_data): Move read of
	ELF header flags to after check for ELF object file.  Loop through
	sections looking for code sections, if none, then skip ABI checks.
parent 8b01621d
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment