Opened 7 years ago

Last modified 16 months ago

#3713 new task

Track -dynamic/-fPIC to avoid obscure linker errors

Reported by: simonmar Owned by:
Priority: low Milestone:
Component: Compiler (Linking) Version: 6.10.4
Keywords: Cc: dankna@…, dterei
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:

Description

Using the wrong combination of -dynamic and/or -fPIC can lead to obscure linker errors, see e.g. #3705. We should track whether an object file was compiled with -dynamic and -fPIC so that we can give better error messages before running the linker.

See also

#3712
Implement -dynamic-lib option

Change History (13)

comment:1 Changed 7 years ago by duncan

Doing this on a per-object file basis will require adding extra custom sections to the object files. This is something we want to do anyway so that we can add other info such as:

  • .hi file content
  • stack trace debug info

The ability to insert and read custom sections will have to be implemented separately on each of ELF, Mach-O and PE. It should be possible to have a consistent interface on each platform however.

comment:2 Changed 6 years ago by igloo

Milestone: 7.0.17.0.2

comment:3 Changed 6 years ago by dankna

Cc: dankna@… added

comment:4 Changed 6 years ago by igloo

Milestone: 7.0.27.2.1

comment:5 Changed 6 years ago by dterei

Cc: dterei added

comment:6 Changed 6 years ago by igloo

Milestone: 7.2.17.4.1

comment:7 Changed 5 years ago by igloo

Milestone: 7.4.17.6.1
Priority: normallow

comment:8 Changed 5 years ago by igloo

Milestone: 7.6.17.6.2

comment:9 Changed 3 years ago by thoughtpolice

Milestone: 7.6.27.10.1

Moving to 7.10.1.

comment:10 Changed 2 years ago by thoughtpolice

Milestone: 7.10.17.12.1

Moving to 7.12.1 milestone; if you feel this is an error and should be addressed sooner, please move it back to the 7.10.1 milestone.

comment:11 Changed 21 months ago by ezyang

Component: CompilerCompiler (Linking)

comment:12 Changed 21 months ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

comment:13 Changed 16 months ago by thomie

Milestone: 8.0.1
Note: See TracTickets for help on using tickets.