Opened 5 years ago

Last modified 4 months ago

#3713 new task

Track -dynamic/-fPIC to avoid obscure linker errors

Reported by: simonmar Owned by:
Priority: low Milestone: 7.12.1
Component: Compiler 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 Revisions:

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 (10)

comment:1 Changed 5 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 4 years ago by igloo

  • Milestone changed from 7.0.1 to 7.0.2

comment:3 Changed 4 years ago by dankna

  • Cc dankna@… added

comment:4 Changed 4 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:5 Changed 4 years ago by dterei

  • Cc dterei added

comment:6 Changed 4 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:7 Changed 3 years ago by igloo

  • Milestone changed from 7.4.1 to 7.6.1
  • Priority changed from normal to low

comment:8 Changed 3 years ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2

comment:9 Changed 10 months ago by thoughtpolice

  • Milestone changed from 7.6.2 to 7.10.1

Moving to 7.10.1.

comment:10 Changed 4 months ago by thoughtpolice

  • Milestone changed from 7.10.1 to 7.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.

Note: See TracTickets for help on using tickets.