Ticket #3713 (new task)

Opened 3 years ago

Last modified 8 months ago

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

Changed 3 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.

Changed 2 years ago by igloo

  • milestone changed from 7.0.1 to 7.0.2

Changed 2 years ago by dankna

  • cc dankna@… added

Changed 2 years ago by igloo

  • milestone changed from 7.0.2 to 7.2.1

Changed 2 years ago by dterei

  • cc dterei added

Changed 20 months ago by igloo

  • milestone changed from 7.2.1 to 7.4.1

Changed 15 months ago by igloo

  • priority changed from normal to low
  • milestone changed from 7.4.1 to 7.6.1

Changed 8 months ago by igloo

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