Project

General

Profile

Bug #3410

ld(1) should possibly not allow -F and non-mapfile input files

Added by Rich Lowe over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
tools - gate/build tools
Start date:
2012-12-11
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage
Gerrit CR:

Description

ld currently allows one to do

ld -G -o libfoo.so -Flibc.so foo.o bar.o baz.o

-F means that the symbol table of our libfoo.so is used, entirely, as a filter on libc. This means that any symbol only in libfoo.so will be unusable, and any symbol in the filtee (libc) will refer to the libc symbol.

On the one hand, this is a valid, if unusual, way to build a filter library

void
printf()
{
return;
}

as a source file will cause 'printf' to be in the symbol table, filtered to libc, etc.

On the other hand, I would presume that the chances of anyone ever doing this on purpose are just about 0. We should probably emit, at least, a warning.

History

#1

Updated by Rich Lowe over 7 years ago

We actually use this to build libsys, so that would have to change too

Also available in: Atom PDF