SHA256
1
0
forked from pool/glibc
glibc/riscv-readelflib.patch
Andreas Schwab 2e3e51886a Accepting request 580191 from home:Andreas_Schwab:Factory
- Add systemtap-headers to BuildRequires
- Add --enable-systemtap to configure arguments (fate#324969, bsc#1073636)

- riscv-readelflib.patch: Fix parsing flags in ELF64 files on riscv

OBS-URL: https://build.opensuse.org/request/show/580191
OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=495
2018-02-26 11:20:11 +00:00

28 lines
1021 B
Diff

2018-02-09 DJ Delorie <dj@redhat.com>
[BZ #22827]
* sysdeps/unix/sysv/linux/riscv/readelflib.c (process_elf_file): Use
64-bit ELF type for 64-bit ELF objects.
Index: glibc-2.27/sysdeps/unix/sysv/linux/riscv/readelflib.c
===================================================================
--- glibc-2.27.orig/sysdeps/unix/sysv/linux/riscv/readelflib.c
+++ glibc-2.27/sysdeps/unix/sysv/linux/riscv/readelflib.c
@@ -43,6 +43,7 @@ process_elf_file (const char *file_name,
{
ElfW(Ehdr) *elf_header = (ElfW(Ehdr) *) file_contents;
Elf32_Ehdr *elf32_header = (Elf32_Ehdr *) elf_header;
+ Elf64_Ehdr *elf64_header = (Elf64_Ehdr *) elf_header;
int ret;
long flags;
@@ -59,7 +60,7 @@ process_elf_file (const char *file_name,
{
ret = process_elf64_file (file_name, lib, flag, osversion, soname,
file_contents, file_length);
- flags = elf32_header->e_flags;
+ flags = elf64_header->e_flags;
}
/* RISC-V linkers encode the floating point ABI as part of the ELF headers. */