This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug ld/13561] AIX link failure: RLD address not contained in section


ka5427-536 at online dot de wrote:
http://sourceware.org/bugzilla/show_bug.cgi?id=13561

--- Comment #10 from Hans-Georg Thien<ka5427-536 at online dot de>  2012-03-13 22:06:16 UTC ---
(In reply to comment #0)
Created attachment 6146 [details]
Objects, Sources, Makefile

We are trying to use 'partial linking' to reduce the size of the resulting
binary. But it seems that the
object file produced by the partial link step is somehow corrupted. The AIX
linker complains with


ld: 0711-547 SEVERE ERROR: Object partial.o cannot be processed. RLD address 0x10000364 for section 2 (.data) is not contained in the section. collect2: ld returned 12 exit status


Source files:


sandbox@rs6k> cat main.cpp

      int main() {
        return 0;
      }


sandbox@rs6k> cat foo.cpp


#include<memory>

      void foo() {
        std::auto_ptr<int>  p1(new int);
      }


sandbox@rs6k> cat bar.cpp


#include<memory>

      void bar() {
        std::auto_ptr<int>  p1(new int);
      }


build steps:


   g++ -fPIC -o foo.o -c foo.cpp
   g++ -fPIC -o bar.o -c bar.cpp

   # now the partial link step ...
   gnu-ld -r -o partial.o foo.o bar.o

g++ -c -o main.o main.cpp

   # now the final link step fails ...
   g++ -o demo main.o partial.o

# ... fails with an error message from the AIX linker:

   ld: 0711-547 SEVERE ERROR: Object partial.o cannot be processed.
      RLD address 0x10000364 for section 2 (.data) is
      not contained in the section.
   collect2: ld returned 12 exit status


version information:


g++ --version

g++ (GCC) 4.5.3

gnu-ld --version

GNU ld (GNU Binutils) 2.22.51.20111212

AIX Linker: ld -V

ld: LD 1.65.2.6 (2/24/09)

AIX OS: oslevel -s

5300-03-CSP-0000
[update]
it turned out that this issue occurs whenever the same non-default constructor
is used in more then one compilation unit



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]