runtime_loader: fixes the 64-bit build.
1/ error: no matching function for call to 'min(long unsigned int, uint32&)'. 2/ error: comparison between signed and unsigned integer expressions.
This commit is contained in:
parent
3a7e0b0014
commit
72950e7c15
@ -494,7 +494,8 @@ determine_x86_abi(int fd, const Elf32_Ehdr& elfHeader, bool& _isGcc2)
|
||||
if (symbolHash == NULL || symbolTable == NULL || stringTable == NULL)
|
||||
return false;
|
||||
uint32 symbolCount
|
||||
= std::min(symbolTableSize / sizeof(Elf32_Sym), symbolHashChainSize);
|
||||
= std::min(symbolTableSize / (uint32)sizeof(Elf32_Sym),
|
||||
symbolHashChainSize);
|
||||
if (symbolCount < symbolHashSize)
|
||||
return false;
|
||||
|
||||
@ -520,7 +521,7 @@ determine_x86_abi(int fd, const Elf32_Ehdr& elfHeader, bool& _isGcc2)
|
||||
<= sectionHeader->sh_addr + sectionHeader->sh_size) {
|
||||
off_t fileOffset = symbol->st_value - sectionHeader->sh_addr
|
||||
+ sectionHeader->sh_offset;
|
||||
if (fileOffset + sizeof(uint32) <= st.st_size) {
|
||||
if (fileOffset + (off_t)sizeof(uint32) <= st.st_size) {
|
||||
uint32 abi
|
||||
= *(uint32*)((uint8*)fileBaseAddress + fileOffset);
|
||||
_isGcc2 = (abi & B_HAIKU_ABI_MAJOR)
|
||||
|
Loading…
Reference in New Issue
Block a user