This is an archive of the discontinued LLVM Phabricator instance.

Handle -G as an alias to -shared
Needs ReviewPublic

Authored by espindola on Feb 7 2017, 1:36 PM.
This revision needs review, but all reviewers have resigned.

Details

Reviewers
atanasyan
Summary

bfd handles -G without a value as meaning -shared.

It looks like gold only support -G as an alias to -shared.

The java3d packages uses -G instead of -shared.

This patch changes lld to handle -G as an alias to -shared. This means we would now error on "-G 123". How common is it for programs to use it meaning --gpsize?

Diff Detail

Event Timeline

rafael created this revision.Feb 7 2017, 1:36 PM

sending email to llvm-commits

davide added a subscriber: davide.Feb 7 2017, 2:26 PM
davide added inline comments.
test/ELF/g-is-shared.s
6

You mean equivalent to -shared ?

rafael updated this revision to Diff 87523.Feb 7 2017, 2:40 PM

fix comment

atanasyan edited edge metadata.Feb 7 2017, 10:37 PM

This patch changes lld to handle -G as an alias to -shared. This means we would now error on "-G 123". How common is it for programs to use it meaning --gpsize?

On MIPS this option is rarely used for regular programs, but in case of Linux kernel build, embedded software etc it is commonly used. So it is better to continue ignore a numeric argument.

espindola commandeered this revision.Mar 15 2018, 8:54 AM
espindola added a reviewer: rafael.
atanasyan resigned from this revision.Sep 28 2018, 6:31 AM