Segmentation fault while linking shared library

Bug #392197 reported by Alan Krause
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: binutils

The last version of Ubuntu which successfully compiled a 64 bit shared library (compiler used is free pascal) was 8.04. Ever since binutils has been ubgraded to 2.19.1, I am no longer able to do so due to a segmentation fault in the linker.

To reproduce the problem, do the following:

1. Create and save a file named proj.pas, with the following contents:

library project1;

uses
 Classes;

function dRound(iDec: integer; dRate: double): double;
const
 TenToPower: Array[0..9] of integer = (1, 10, 100, 1000, 10000, 100000,
                                       1000000, 10000000, 100000000, 1000000000);
var
 dInc : double;
begin
 if iDec > 0 then begin
    dInc := 0.5000001;
    result := trunc (dRate * (TenToPower [iDec]) + dInc) /
       TenToPower [iDec];
 end else begin
    result := dRate;
 end ;
end;

function one : double; cdecl;
begin
 Result := dRound( 2, 0.529 ) ;
end;

begin
end.

2. Compile (but not link) the source code using free pascal (v2.2.4):
fpc -Sd -Cg -Cn -O3 proj.pas

3. Attempt to link the shared library using the generated ppas.sh script:
./ppas.sh

Here is the output I receive:

Linking libproj.so
Segmentation fault
An error occurred while linking libproj.so

Revision history for this message
Alan Krause (alan-krause) wrote :

Just a quick update - the same problem happens for i386.

summary: - Segmentation fault while linking 64 bit shared library
+ Segmentation fault while linking shared library
Revision history for this message
Matthias Klose (doko) wrote :

fixed in karmic, binutils 2.19.51.x

Changed in binutils (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.