Differential D38165 Diff 118368 www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt5-webengine/files/patch-src_3rdparty_chromium_base_debug_elf__reader.cc
--- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2020-11-07 01:22:36 UTC | --- src/3rdparty/chromium/base/debug/elf_reader.cc.orig 2021-12-15 16:12:54 UTC | ||||
+++ src/3rdparty/chromium/base/debug/elf_reader.cc | +++ src/3rdparty/chromium/base/debug/elf_reader.cc | ||||
@@ -35,7 +35,9 @@ using Nhdr = Elf64_Nhdr; | @@ -38,7 +38,9 @@ using Word = Elf64_Word; | ||||
using Word = Elf64_Word; | using Word = Elf64_Word; | ||||
#endif | #endif | ||||
+#if !defined(OS_BSD) | +#if !defined(OS_BSD) | ||||
constexpr char kGnuNoteName[] = "GNU"; | constexpr char kGnuNoteName[] = "GNU"; | ||||
+#endif | +#endif | ||||
// Returns a pointer to the header of the ELF binary mapped into memory, | // Returns a pointer to the header of the ELF binary mapped into memory, or a | ||||
// or a null pointer if the header is invalid. | // null pointer if the header is invalid. Here and below |elf_mapped_base| is a | ||||
@@ -98,6 +100,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, | @@ -75,6 +77,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, | ||||
bool found = false; | bool found = false; | ||||
while (current_section < section_end) { | while (current_section < section_end) { | ||||
current_note = reinterpret_cast<const Nhdr*>(current_section); | current_note = reinterpret_cast<const Nhdr*>(current_section); | ||||
+#if !defined(OS_BSD) | +#if !defined(OS_BSD) | ||||
if (current_note->n_type == NT_GNU_BUILD_ID) { | if (current_note->n_type == NT_GNU_BUILD_ID) { | ||||
StringPiece note_name(current_section + sizeof(Nhdr), | StringPiece note_name(current_section + sizeof(Nhdr), | ||||
current_note->n_namesz); | current_note->n_namesz); | ||||
@@ -107,6 +110,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, | @@ -84,6 +87,7 @@ size_t ReadElfBuildId(const void* elf_mapped_base, | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
+#endif | +#endif | ||||
size_t section_size = bits::Align(current_note->n_namesz, 4) + | size_t section_size = bits::Align(current_note->n_namesz, 4) + | ||||
bits::Align(current_note->n_descsz, 4) + | bits::Align(current_note->n_descsz, 4) + |