GithubHelp home page GithubHelp logo

Comments (3)

jeremyd2019 avatar jeremyd2019 commented on August 21, 2024

OK, check this out:

$ objdump -h /usr/bin/msys-2.0.dll

/usr/bin/msys-2.0.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
...
 11 .rsrc         00000408  612e6000  612e6000  002a6a00  2**2
                  CONTENTS, ALLOC, LOAD, DATA
 12 .cygheap      00209000  612e7000  612e7000  00000000  2**2
                  ALLOC

$ nm -B /usr/bin/msys-2.0.dll | grep cygheap_start
612e6408 D __cygheap_start
$ objdump -h usr/bin/msys-2.0.dll

usr/bin/msys-2.0.dll:     file format pei-i386

Sections:
Idx Name          Size      VMA       LMA       File off  Algn
...
 11 .rsrc         00000408  612e5000  612e5000  002a6200  2**2
                  CONTENTS, ALLOC, LOAD, READONLY, DATA
 12 .cygheap      0020a000  612e6000  612e6000  00000000  2**2
                  ALLOC

$ nm -B usr/bin/msys-2.0.dll | grep cygheap_start
612e5408 R __cygheap_start

So _cygheap_start is actually in the .rsrc section, and that section seems to have changed to be READONLY. That actually makes some sense, due to:

.rsrc BLOCK(__section_alignment__) :
{
*(.rsrc)
*(SORT(.rsrc$*))
_SYM (_cygheap_start) = .;
}
.cygheap ALIGN(__section_alignment__) :
{
#ifdef __x86_64__
. = . + (3072 * 1024);
#else
. = . + (2048 * 1024);
#endif
. = ALIGN(0x10000);
_SYM (_cygheap_end) = .;
}

Maybe the solution is to figure out how to make the .rsrc section writable again? I have to imagine there's some good reason why _cygheap_start was put in the .rsrc instead of .cygheap section to begin with...

from msys2-runtime.

lazka avatar lazka commented on August 21, 2024

bminor/binutils-gdb@c53c618 / https://sourceware.org/bugzilla/show_bug.cgi?id=30142 ?

from msys2-runtime.

jeremyd2019 avatar jeremyd2019 commented on August 21, 2024

I saw that, but I don't yet see a way to force the section to be writable. I've been playing with objcopy but I'm not getting --set-section-flags to do what I want.

from msys2-runtime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.