mirror of
https://github.com/encounter/objdiff.git
synced 2026-07-10 12:18:36 -07:00
Fix armcc symbols always being hidden (#364)
This commit is contained in:
@@ -9,7 +9,7 @@ use alloc::{
|
||||
use core::{cmp::Ordering, num::NonZeroU64};
|
||||
|
||||
use anyhow::{Context, Result, anyhow, bail, ensure};
|
||||
use object::{Object as _, ObjectSection as _, ObjectSymbol as _};
|
||||
use object::{Architecture, Object as _, ObjectSection as _, ObjectSymbol as _};
|
||||
|
||||
use crate::{
|
||||
arch::{Arch, RelocationOverride, RelocationOverrideTarget, new_arch},
|
||||
@@ -133,7 +133,9 @@ fn map_symbol(
|
||||
if symbol.is_weak() {
|
||||
flags |= SymbolFlag::Weak;
|
||||
}
|
||||
if file.format() == object::BinaryFormat::Elf && symbol.scope() == object::SymbolScope::Linkage
|
||||
if file.format() == object::BinaryFormat::Elf
|
||||
&& symbol.scope() == object::SymbolScope::Linkage
|
||||
&& (file.architecture() != Architecture::Arm || !symbol.is_global())
|
||||
{
|
||||
flags |= SymbolFlag::Hidden;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user