Remove globalize_symbols test (#116)

This commit is contained in:
2025-09-13 02:14:37 -06:00
committed by GitHub
parent 31c42d58db
commit 9c5210184d
3 changed files with 25 additions and 15 deletions

View File

@@ -234,6 +234,9 @@ pub struct ProjectConfig {
/// Marks all emitted symbols as "exported" to prevent the linker from removing them.
#[serde(default = "bool_true", skip_serializing_if = "is_true")]
pub export_all: bool,
/// Promotes local symbols referenced by other units to global.
#[serde(default = "bool_true", skip_serializing_if = "is_true")]
pub globalize_symbols: bool,
/// Optional base path for all object files.
#[serde(with = "unix_path_serde_option", default, skip_serializing_if = "is_default")]
pub object_base: Option<Utf8UnixPathBuf>,
@@ -259,6 +262,7 @@ impl Default for ProjectConfig {
symbols_known: false,
fill_gaps: true,
export_all: true,
globalize_symbols: true,
object_base: None,
extract_objects: true,
}
@@ -967,7 +971,7 @@ fn split_write_obj(
debug!("Splitting {} objects", module.obj.link_order.len());
let module_name = module.config.name().to_string();
let split_objs = split_obj(&module.obj, Some(module_name.as_str()))?;
let split_objs = split_obj(&module.obj, Some(module_name.as_str()), config.globalize_symbols)?;
debug!("Writing object files");
DirBuilder::new()

View File

@@ -136,7 +136,7 @@ fn disasm(args: DisasmArgs) -> Result<()> {
match obj.kind {
ObjKind::Executable => {
log::info!("Splitting {} objects", obj.link_order.len());
let split_objs = split_obj(&obj, None)?;
let split_objs = split_obj(&obj, None, false)?;
let asm_dir = args.out.join("asm");
let include_dir = args.out.join("include");