×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Nov 2009
    Posts
    5

    Unhappy ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    i get this linker error: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text....
    in old s60 c++ sdk, i changed DATA_SEGMENT in some perl scripts and everything was ok. but how to get this working in qt?
    after some search, i added

    QMAKE_LFLAGS.ARMCC += --rw-base 0xC00000
    QMAKE_LFLAGS.GCCE += -Tdata 0xC00000

    to my .pro file, it generates some stuff to .mmp file:

    LINKEROPTION ARMCC --rw-base 0xC00000
    LINKEROPTION GCCE -Tdata 0xC00000

    but it doesn't help. stil the same error (i'm using Qt SDK 1.1 Technology Preview)

    ....symbian is still the same pain why do i need to search 3 days that i need to specify bigger stack size, heap size and other things in one "modern" mobile os?

  2. #2
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    Symbian is Symbian and the build tool chain for Symbian is the same good old one you know (unless you are using S^3 and its brand new SBSv2).
    As such:
    a) the same perl scipt changes should still work at least for the S^1 based configuration
    b) if there is something special about your project (size, structure) you should create a bug report (at http://bugreports.qt.nokia.com ), explain the context and ask for the SDK to be patched so that it supports your use case
    c) although your're writing the values in the *.pro/*.pri file, you're still setting the same MMP rules for defining heap and stack size. You should not need to search more then 5 minutes to find the answer you need.

    Then again, if something can be done better, let us know.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  3. #3
    Registered User
    Join Date
    Nov 2009
    Posts
    5

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    1) i'm using s^3, it tried to change the scripts there, but no effect
    2) i don't understand, i've found many references that specifying --rw-base and Tdata should do the job, but it doesn't. is it a bug? here's symbian-dependent part of my .pro file

    Code:
    symbian {
        QMAKE_CXXFLAGS.ARMCC += --signed_chars
        QMAKE_CXXFLAGS.GCCE += -fsigned-char
    
        MMP_RULES += "ALWAYS_BUILD_AS_ARM"
    
        TARGET.UID3 = 0xI dont tell you :)
        TARGET.EPOCSTACKSIZE = 0x10000
        TARGET.EPOCHEAPSIZE = 0x100000 0x4000000
    
        QMAKE_LFLAGS.ARMCC += --rw-base 0xC00000
        QMAKE_LFLAGS.GCCE += -Tdata 0xC00000
    }
    as you can see I'm also specifyng heap and stack size, but in mmp file i see another values:

    ....
    EPOCSTACKSIZE 0x10000
    EPOCHEAPSIZE 0x20000 0x2000000
    ...

    again, is it a bug or there are some restrictions? weird is, that for static library, heap and stack size are generated well to mmp (although it has no effect for static library)

  4. #4
    Super Contributor
    Join Date
    Nov 2009
    Location
    Minnesota, USA
    Posts
    3,209

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    Did you check all the overlap messages to see if C00000 is sufficient (and not too much)?

    Changing the perl scripts is not necessary, and, once you've done it, the .pro file changes become ineffective.

    Note that an overflowing code segment is most likely due to "abuse" of resource files -- putting too many large objects into them.

    If "TARGET.EPOCHEAPSIZE = 0x100000 0x4000000" isn't getting translated into your .mmp file then you're looking at the wrong .pro or .mmp or you've screwed up the .pro format somehow.
    Last edited by danhicksbyron; 2011-02-09 at 07:14.

  5. #5
    Registered User
    Join Date
    Nov 2009
    Posts
    5

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    Our exe is quite huge with lot of static data, I was using 0xB00000 with old s^1 sdk and everything was ok. so I guess 0xC00000 should be enough with s^3 also. Now I found there is "RW_BASE:=-Wl,-Tdata,0x400000" line in "Makefile_all.default" file - it looks like my values are ignored even if i edit the makefile and change the value to 0xC00000 before the linker runs, it doesn't help.
    Any idea in which file the default 0x400000 size is specified?

  6. #6
    Registered User
    Join Date
    Nov 2009
    Posts
    5

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    Ok, I found why my heap and stack sizes are ignored, there's "magical" setcion at the end of the .pro file:

    Code:
    # Please do not modify the following two lines. Required for deployment.
    include(deployment.pri)
    qtcAddDeployment()
    which overwrites my heap and stack size, so it's enough to put my sizes after these lines. Now comes the .data section size

  7. #7
    Registered User
    Join Date
    Nov 2009
    Posts
    5

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    I've searched every file in entire qt sdk which contains 0x400000 value, changed it to 0xC00000. and guess what, there is still 0x400000 in makefile!! is it hardcoded or what???

  8. #8
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: ld.exe: section .data loaded at [00400000,004056af] overlaps section .text

    Quote Originally Posted by sygic View Post
    Ok, I found why my heap and stack sizes are ignored, there's "magical" setcion at the end of the .pro file:

    Code:
    # Please do not modify the following two lines. Required for deployment.
    include(deployment.pri)
    qtcAddDeployment()
    which overwrites my heap and stack size, so it's enough to put my sizes after these lines. Now comes the .data section size
    The overwriting of the values is solved in QTCREATORBUG-3454
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. mwldsym2.exe: Multiply defined section: linking errors
    By muralidharvvk in forum Symbian
    Replies: 8
    Last Post: 2009-11-05, 19:54
  2. Replies: 6
    Last Post: 2009-10-12, 12:32
  3. Error -> mwldsym2.exe: Multiply defined section:
    By SymbianTH in forum Open C/C++
    Replies: 7
    Last Post: 2009-09-21, 14:23
  4. Replies: 19
    Last Post: 2009-01-23, 06:20

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×