Opened 4 years ago

Last modified 19 months ago

#3713 new task

Track -dynamic/-fPIC to avoid obscure linker errors

Reported by: simonmar Owned by:
Priority: low Milestone: 7.6.2
Component: Compiler Version: 6.10.4
Keywords: Cc: dankna@…, dterei
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Moderate (less than a day)
Test Case: Blocked By:
Blocking: Related Tickets:

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

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

  • Milestone changed from 7.0.1 to 7.0.2

comment:3 Changed 3 years ago by dankna

  • Cc dankna@… added

comment:4 Changed 3 years ago by igloo

  • Milestone changed from 7.0.2 to 7.2.1

comment:5 Changed 3 years ago by dterei

  • Cc dterei added

comment:6 Changed 3 years ago by igloo

  • Milestone changed from 7.2.1 to 7.4.1

comment:7 Changed 2 years ago by igloo

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

comment:8 Changed 19 months ago by igloo

  • Milestone changed from 7.6.1 to 7.6.2
Note: See TracTickets for help on using tickets.