Skip to content

[reproduce] Preserve linker inputs when reproduce link fails - #2068

Draft
Steven Ramirez Rosa (Steven6798) wants to merge 1 commit into
qualcomm:mainfrom
Steven6798:issue-1014
Draft

Steven Ramirez Rosa (Steven6798) wants to merge 1 commit into
qualcomm:mainfrom
Steven6798:issue-1014

Conversation

@Steven6798

Copy link
Copy Markdown
Contributor

Capture linker scripts and unresolved namespecs when input activation fails so the reproduce response preserves the original failure. Avoid applying mapping-file resolution to unmapped replay namespecs while retaining normal mapped namespec behavior.

Fix: #1014

Comment thread lib/Input/Input.cpp Outdated
// namespecs that have an explicit mapping entry, preserving normal mapped
// link behavior.
if (PConfig.options().hasMappingFile() && !isInternal() &&
(Type != Input::Namespec || PConfig.hasMappingForFile(FileName)))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this condition be simplified or made into a seperate function ?

Input::resolveReproducePath() ?

This will allow the critical code without reproduce unaffected.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if my latest change is what you were looking for.

@@ -1763,6 +1770,8 @@ bool GnuLdDriver::processReproduceOption(
break;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could not follow this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot just return because we failed to resolve the action. That's how we end up without the input file in the reproduce.

@Steven6798
Steven Ramirez Rosa (Steven6798) marked this pull request as draft October 6, 2026 18:40
Capture linker scripts and unresolved namespecs when input
activation fails so the reproduce response preserves the original
failure. Avoid applying mapping-file resolution to unmapped
replay namespecs while retaining normal mapped namespec behavior.

Fix: qualcomm#1014

Signed-off-by: Steven Ramirez Rosa <ramirezr@qti.qualcomm.com>
arg->getValue(), eld::SearchDirs::SearchInputType::Script))
ResolvedPath = Resolved->native();
if (!ResolvedPath.empty())
outputTar->createAndAddScriptFile(arg->getValue(), ResolvedPath);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that we add this script twice? What about scripts that include other scripts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will look into this. Thanks!

@Steven6798
Steven Ramirez Rosa (Steven6798) marked this pull request as draft October 6, 2026 20:33

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Input files missing in the reproduce tarball when the link fails while reading inputs

4 participants