Ticket #56 (closed defect: worksforme)

Opened 2 years ago

Last modified 2 years ago

Improved Weak Symbol Handling

Reported by: pragma Assigned to: pragma
Priority: critical Milestone: RC1
Component: DDL (all) Version: Beta 1
Keywords: Cc:

Description

Templates currently do nasty things with DDL.

The problem comes from DMD's tendency to glom template instances to individual .obj's if they are compiled individually. The Linker presently blindly resolves 'weak' symbols as externs wherever possible, but keeps the related fixup information. Should a module have fixups that point to the old weak address, they fail when the resolved address lives in the host's memory space.

Solution A: allow the Linker to communicate to the Module to drop fixups that target a given symbol.

Solution B (relies on #55): have the Linker change a symbol's information to reflect the local/external address. The module will then be responsible for throwing out fixup information that attempts to fix an externally resolved address. Internally weak addresses will still be valid for self-resolution.

Change History

11/15/06 21:16:35 changed by pragma

  • status changed from new to closed.
  • resolution set to worksforme.

Resolved in [274].