Project

General

Profile

Feature #3802

ld should support --gc-sections option

Added by Alexander Pyhalov over 6 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
cmd - userland programs
Start date:
2013-06-06
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

/usr/ccs/bin/ld doesn't support --gc-sections option. This is why during GCC 4.7 tests it fails with the following error:

Executing on host: c++ ./g++.dg/eh/gcsec1.C fmessage-length=0 -std=gnu++98 -ffunction-sections -Wl,--gc-sections -lm -o ./gcsec1.exe (timeout = 300)
spawn c++ ./g++.dg/eh/gcsec1.C -fmessage-length=0 -std=gnu++98 -ffunction-sections -Wl,--gc-sections -lm -o ./gcsec1.exe
ld: fatal: unrecognized option '-
'
ld: fatal: use the -z help option for usage information

ld should support this option for better compatibility with GNU ld.

Also available in: Atom PDF