Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Snippets
  • Sign up now
  • Login
  • Sign in / Register
  • FPC Source FPC Source
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1,357
    • Issues 1,357
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 71
    • Merge requests 71
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • External wiki
    • External wiki
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FPC
  • FPCFPC
  • FPC SourceFPC Source
  • Issues
  • #24518
Closed
Open
Issue created May 30, 2013 by FPC Admin account@fpc_adminOwner

fpc silently omits crti.o and crtn.o from linker script if it can't find them.

Original Reporter info from Mantis: plugwash
  • Reporter name: peter green

Description:

When building a program that links against a C library if fpc can't find crti.o and crtn.o it silently leaves them out of the linker script. On i386 and x86-64 the program is linked sucessfully anyway. However on other platforms it causes link errors. For example.

Linking test
/usr/bin/ld.bfd.real: warning: link.res contains output sections; did you forget -T?
./usr/lib/fpc/2.6.0/units/arm-linux/rtl/cprt0.o: In function _haltproc_eabi':<br/> (.text+0x88): undefined reference to _fini'
./usr/lib/fpc/2.6.0/units/arm-linux/rtl/cprt0.o: In function _haltproc_eabi':<br/> (.text+0x90): undefined reference to _init'
test.dpr(4,4) Error: Error while linking
test.dpr(4,4) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted

These errors do not make it at all obvious that the problem is that freepascal can't find files it needs.

This happens at least with 2.6.0 and 2.6.2 but i'm fairly sure it happens over a wider range of versions than that.

Mantis conversion info:

  • Mantis ID: 24518
  • OS: linux
  • Platform: arm, powerpc, sparc
  • Version: 2.6.0
  • Fixed in version: 3.0.0
  • Fixed in revision: 23892 (#7511968f)
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking