ac/rgp: BSD elf library compatibility

Allow compilation on Windows using modified BSD elf library.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9210>
This commit is contained in:
James Park 2021-02-23 01:55:28 -08:00 committed by Marge Bot
parent e62c7e7c6c
commit 1aeebac4e6
3 changed files with 4 additions and 4 deletions

View File

@ -847,7 +847,7 @@ static void ac_sqtt_dump_data(struct radeon_info *rad_info,
struct sqtt_file_chunk_code_object_database code_object;
struct sqtt_code_object_database_record code_object_record;
uint32_t elf_size_calc = 0;
uint flags = ac_chip_class_to_elf_gfxip_level(rad_info->chip_class);
uint32_t flags = ac_chip_class_to_elf_gfxip_level(rad_info->chip_class);
fseek(output, sizeof(struct sqtt_file_chunk_code_object_database), SEEK_CUR);
file_offset += sizeof(struct sqtt_file_chunk_code_object_database);

View File

@ -108,6 +108,6 @@ struct rgp_pso_correlation {
void
ac_rgp_file_write_elf_object(FILE *output, size_t file_elf_start,
struct rgp_code_object_record *record,
uint32_t *written_size, uint flags);
uint32_t *written_size, uint32_t flags);
#endif

View File

@ -34,7 +34,7 @@
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "elf.h"
#include <libelf.h>
#include "ac_msgpack.h"
#include "ac_rgp.h"
#include "main/macros.h"
@ -364,7 +364,7 @@ struct ac_rgp_elf_note_msgpack_hdr {
void
ac_rgp_file_write_elf_object(FILE *output, size_t file_elf_start,
struct rgp_code_object_record *record,
uint32_t *written_size, uint flags)
uint32_t *written_size, uint32_t flags)
{
Elf64_Ehdr elf_hdr;
Elf64_Shdr sec_hdr[5];