idank / idank/explainshell

Weird output for gcc -Wl,option

Open
#246 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
14.2k
Forks
851
PR merge metrics
No merged PRs in 30d

Description

I was looking for the explanations on this command:

gcc -shared -o c.so -Wl,--whole-archive a.a b.a -Wl,--no-whole-archive

Which I've found on this StackOverflow post.

Oddly, explainshell does not recognize the -Wl,option but assumes the l in -Wl to stand for the "library" option. It shows some other apparently misplaced results.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported command gcc -shared -o c.so -Wl,--whole-archive a.a b.a -Wl,--no-whole-archive in explainshell and inspect how its command-line parser handles -Wl,option. Compare the output with the linked GCC option explanation; done means the linker options are recognized and the displayed explanations are no longer misplaced.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli, compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.