Skip to content

Commit 7d0528e

Browse files
committed
Fix armcc symbols always being hidden
1 parent 13f1267 commit 7d0528e

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

objdiff-core/src/obj/read.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use alloc::{
99
use core::{cmp::Ordering, num::NonZeroU64};
1010

1111
use anyhow::{Context, Result, anyhow, bail, ensure};
12-
use object::{Object as _, ObjectSection as _, ObjectSymbol as _};
12+
use object::{Architecture, Object as _, ObjectSection as _, ObjectSymbol as _};
1313

1414
use crate::{
1515
arch::{Arch, RelocationOverride, RelocationOverrideTarget, new_arch},
@@ -133,7 +133,9 @@ fn map_symbol(
133133
if symbol.is_weak() {
134134
flags |= SymbolFlag::Weak;
135135
}
136-
if file.format() == object::BinaryFormat::Elf && symbol.scope() == object::SymbolScope::Linkage
136+
if file.format() == object::BinaryFormat::Elf
137+
&& symbol.scope() == object::SymbolScope::Linkage
138+
&& (file.architecture() != Architecture::Arm || !symbol.is_global())
137139
{
138140
flags |= SymbolFlag::Hidden;
139141
}

0 commit comments

Comments
 (0)