fix clang builds

This commit is contained in:
Ryan Fleury
2024-10-07 14:43:31 -07:00
parent 7114a20e66
commit c7ce08fd71
8 changed files with 22 additions and 16 deletions
+4
View File
@@ -1070,6 +1070,9 @@ static DWARF_FormDecodeRules
dwarf_form_decode_rule(DWARF_AttributeForm form, U64 address_size, U64 offset_size){
DWARF_FormDecodeRules result = {0};
switch (form){
case DWARF_AttributeForm_null:
case DWARF_AttributeForm_indirect:{}break;
case DWARF_AttributeForm_addr: result.size = address_size; break;
case DWARF_AttributeForm_addrx: result.uleb128 = 1; break;
case DWARF_AttributeForm_addrx1: result.size = 1; break;
@@ -1286,6 +1289,7 @@ static String8
dwarf_string_from_section_code(DWARF_SectionCode sec_code){
String8 result = str8_lit("unrecognized_section_code");
switch (sec_code){
case DWARF_SectionCode_COUNT:{}break;
#define X(Nc,Vf,N0,N1,N2) case DWARF_SectionCode_##Nc: result = str8_lit(#Nc); break;
DWARF_SectionNameXList(X,0,0)
#undef X
+1 -1
View File
@@ -1240,7 +1240,7 @@ typedef struct DWARF_LocListsParsed{
////////////////////////////////
//~ Dwarf Decode Helpers
#define DWARF_LEB128_ADV(p,o,s) do{ for(;; (p)+=1){\
#define DWARF_LEB128_ADV(p,o,s) do{ (s)=1; for(;; (p)+=1){\
if ((p) == (o)) { (s)=0; break; } \
if (((*(p))&0x80) == 0) { (p)+=1; break; } \
} }while(0)
+2
View File
@@ -476,6 +476,8 @@ elf_sym_array_from_data(Arena *arena, ELF_Class elf_class, String8 data){
ELF_Sym64 *symbols = 0;
U64 count = 0;
switch (elf_class){
default:{}break;
case ELF_Class_32:
{
count = data.size/sizeof(ELF_Sym32);