Re: [Mingw-w64-public] changing a DLLs load-time dynamic link dependency

2013-11-15 Thread Kai Tietz
2013/11/15 Jon jon.for...@gmail.com:
 After skimming LRN's ntldd https://github.com/LRN/ntldd tool, reading tinype
 again http://www.phreedom.org/research/tinype/ and updating my upx
 http://upx.sourceforge.net/ I'm curious if binary tweaks to mingw built DLLs
 (e.g. - libffi, libxml2, etc) could easily solve one of the mingw/VC++
 integration issues.

 Specifically, the using-the-same-msvcrt-version issue. Mingw GCC's default
 to linking against msvcrt.dll and the VC++ compilers link to other versions
 depending up toolchain version.

 The only fix I'm aware of is creative use of GCC spec files when building
 from source. One day I'll find time to swing back to work on my
 symlink-to-multiple-spec-files hack, but there's also the missing .a file
 concern.

 Could an easier solution be to simply build your DLL library (e.g. - libffi)
 with GCC that load-time dynamic links to msvcrt.dll, then munge the PE
 format to replace the reference to msvcrt.dll (a string?) to say
 msvcr120.dll (another string?) and then fixup all effected
 references/addresses in the DLL library?

 Essentially build a tool that creates binary copies of the original
 msvcrt.dll load-time linked DLL that switches the load-time link info to
 reference another msvcr*.dll version. Nothing else. Similar to working in
 the frequency domain rather than the time domain.

 Completely bypass source and spec file issues and just generate slightly
 tweaked clones of your original DLL.

 I've not spent enough time with the PE format or the MSFT system DLL Export
 Address tables, dynamic linker, ordinals, et al to know if this idea is DOA,
 but it's highly likely some of you know.

 I'm making a lot of assumptions, but what are the showstoppers to this idea?
 Anyone tried this, working on this, or know of a tool (binutils?) that
 already does this? RTFM links to get smarter?

 Thanks, Jon

To introduce delayed-loading isn't working 100%.  The
none-function-imports especially making troubles here.  Well, for
proper decorated dllimport-ed symbols it works.  Nevertheless are
all feature of auto-import not working (pseudo-relocation etc).

IMHO it would be easier to write a tool, which modifies the PE-header
of a DLL/EXE.

Regards,
Kai

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] pthread_attr_setschedpolicy not implemented

2013-11-15 Thread Victor Bombi
Hello,

versions posix-sjlj for 32 bits (I need C++11 threading) have
pthread_attr_setschedpolicy not implemented
I think that there are some versions of pthread that implement that feature.
Is there any reason for that? Is this going to change in the future?

best regards
victor


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] pthread_attr_setschedpolicy not implemented

2013-11-15 Thread Kai Tietz
2013/11/15 Victor Bombi son...@telefonica.net:
 Hello,

 versions posix-sjlj for 32 bits (I need C++11 threading) have
 pthread_attr_setschedpolicy not implemented
 I think that there are some versions of pthread that implement that feature.
 Is there any reason for that? Is this going to change in the future?

 best regards
 victor

Well, we support pthread_setschedparam by which you can specify
threading-policy.  Nevertheless, yes we lack this function.  In
general its implementation is pretty much trivial, as on Win32 target
just SCHED_OTHER can be supported.

Kai

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] pthread_attr_setschedpolicy not implemented

2013-11-15 Thread Victor Bombi
another question is:
Why cant we have C++11 threading with non-posix versions?

 Hello,

 versions posix-sjlj for 32 bits (I need C++11 threading) have
 pthread_attr_setschedpolicy not implemented
 I think that there are some versions of pthread that implement that 
 feature.
 Is there any reason for that? Is this going to change in the future?

 best regards
 victor


 --
 DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
 OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
 Free app hosting. Or install the open source package on any LAMP server.
 Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
 http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public 


--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] C++11 threading with non-posix versions

2013-11-15 Thread Ruben Van Boxem
2013/11/15 Victor Bombi son...@telefonica.net

 Hello,

 Why cant we have C++11 threading with non-posix versions?


Because libstdc++ implements thread, mutex and future on top of GCC's
internal thread API, for which only the posix threads backend is
implemented fully.


Ruben



 best
 victor



 --
 DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
 OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
 Free app hosting. Or install the open source package on any LAMP server.
 Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
 http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] changing a DLLs load-time dynamic link dependency

2013-11-15 Thread Jon
On Fri, Nov 15, 2013 at 3:56 AM, Kai Tietz ktiet...@googlemail.com wrote:

 2013/11/15 Jon jon.for...@gmail.com:
  After skimming LRN's ntldd https://github.com/LRN/ntldd tool, reading
 tinype
  again http://www.phreedom.org/research/tinype/ and updating my upx
  http://upx.sourceforge.net/ I'm curious if binary tweaks to mingw built
 DLLs
  (e.g. - libffi, libxml2, etc) could easily solve one of the mingw/VC++
  integration issues.
 
  Specifically, the using-the-same-msvcrt-version issue. Mingw GCC's
 default
  to linking against msvcrt.dll and the VC++ compilers link to other
 versions
  depending up toolchain version.
 
  The only fix I'm aware of is creative use of GCC spec files when
 building
  from source. One day I'll find time to swing back to work on my
  symlink-to-multiple-spec-files hack, but there's also the missing .a file
  concern.
 
  Could an easier solution be to simply build your DLL library (e.g. -
 libffi)
  with GCC that load-time dynamic links to msvcrt.dll, then munge the PE
  format to replace the reference to msvcrt.dll (a string?) to say
  msvcr120.dll (another string?) and then fixup all effected
  references/addresses in the DLL library?
 
  Essentially build a tool that creates binary copies of the original
  msvcrt.dll load-time linked DLL that switches the load-time link info to
  reference another msvcr*.dll version. Nothing else. Similar to working in
  the frequency domain rather than the time domain.
 
  Completely bypass source and spec file issues and just generate slightly
  tweaked clones of your original DLL.
 
  I've not spent enough time with the PE format or the MSFT system DLL
 Export
  Address tables, dynamic linker, ordinals, et al to know if this idea is
 DOA,
  but it's highly likely some of you know.
 
  I'm making a lot of assumptions, but what are the showstoppers to this
 idea?
  Anyone tried this, working on this, or know of a tool (binutils?) that
  already does this? RTFM links to get smarter?
 
  Thanks, Jon

 To introduce delayed-loading isn't working 100%.  The
 none-function-imports especially making troubles here.  Well, for
 proper decorated dllimport-ed symbols it works.  Nevertheless are
 all feature of auto-import not working (pseudo-relocation etc).

 IMHO it would be easier to write a tool, which modifies the PE-header
 of a DLL/EXE.

 Regards,
 Kai


Ah, so if I'm trying to change from this scenario

  exe (VC++) -- DLL (mingw-w64) -- msvcrt.dll

to this scenario via binary hacks to the DLL

  exe (VC++) -- DLL (mingw-w64) -- msvcr110.dll

are you saying I need to learn how to modify the PE header of *only* the
mingw-w64 DLL, or are you saying *both* the DLL and exe PE headers need to
be modified?

Also, are you saying that the VC++ exe should *not* be delay load linked
(i.e. - no /DELAYLOAD linker option) because this doesn't work reliably?

I'm also assuming if I'm able to build this Frankenstein mingw-w64 DLL
linked with msvcr110.dll not msvcrt.dll, I could still use pexports or
gendef to create the .def required by VC++'s lib tool to create the import
lib needed to link to the new mingw-w64 DLL that is linked to msvcr110.dll.
Correct?

Another wacky idea...is it possible to create a custom linker script

https://sourceware.org/binutils/docs/ld/Scripts.html#Scripts

that could persuade ld and its binutils friends to do this rewriting as
part of its job of creating the mingw-w64 DLL?

Jon
--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


[Mingw-w64-public] win7 auto-killing console mode programs

2013-11-15 Thread Jim Michaels
http://social.msdn.microsoft.com/Forums/en-US/1e4e6548-2371-41c0-842d-70a2ed4a495f/win7-is-killing-my-heavy-process-what-to-do?forum=windowsgeneraldevelopmentissues

see my post above. I don't know what's going on but windows 7 is killing my 
long-running console mode programs.it doesn't kill the compiler strangely 
enough. but it kills my program, which has a simple nested loop to create a 
huge bit vector.


-
Jim Michaels
jmich...@yahoo.com
j...@renewalcomputerservices.com
http://RenewalComputerServices.com
http://JesusnJim.com (my personal site, has software)
---
IEC Units: Computer RAM  SSD measurements, microsoft disk size measurements 
(note: they will say GB or MB or KB or TB when it is IEC Units!):
[KiB] [MiB] [GiB] [TiB]
[2^10B=1,024^1B=1KiB]
[2^20B=1,024^2B=1,048,576B=1MiB]
[2^30B=1,024^3B=1,073,741,824B=1GiB]
[2^40B=1,024^4B=1,099,511,627,776B=1TiB]
[2^50B=1,024^5B=1,125,899,906,842,624B=1PiB]
SI Units: Hard disk industry disk size measurements:

[KB] [MB] [GB] [TB]
[10^3B=1,000B=1KB]
[10^6B=1,000,000B=1MB]
[10^9B=1,000,000,000B=1GB]
[10^12B=1,000,000,000,000B=1TB]
[10^15B=1,000,000,000,000,000B=1PB]--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public


Re: [Mingw-w64-public] win7 auto-killing console mode programs

2013-11-15 Thread Ruben Van Boxem
Op 16-nov.-2013 04:44 schreef Jim Michaels jmich...@yahoo.com:


http://social.msdn.microsoft.com/Forums/en-US/1e4e6548-2371-41c0-842d-70a2ed4a495f/win7-is-killing-my-heavy-process-what-to-do?forum=windowsgeneraldevelopmentissues
 see my post above. I don't know what's going on but windows 7 is killing
my long-running console mode programs. it doesn't kill the compiler
strangely enough. but it kills my program, which has a simple nested loop
to create a huge bit vector.

Without a sscce (http://sscce.org/) there is little we can do. Have you run
your program under gdb? My guess is you're ignoring an allocation failure.
If you are attempting to get 64GB of continuous memory, that will not work,
ever, on a system with 64 GB of RAM.

Ruben


 -
 Jim Michaels
 jmich...@yahoo.com
 j...@renewalcomputerservices.com
 http://RenewalComputerServices.com
 http://JesusnJim.com (my personal site, has software)
 ---
 IEC Units: Computer RAM  SSD measurements, microsoft disk size
measurements (note: they will say GB or MB or KB or TB when it is IEC
Units!):
 [KiB] [MiB] [GiB] [TiB]
 [2^10B=1,024^1B=1KiB]
 [2^20B=1,024^2B=1,048,576B=1MiB]
 [2^30B=1,024^3B=1,073,741,824B=1GiB]
 [2^40B=1,024^4B=1,099,511,627,776B=1TiB]
 [2^50B=1,024^5B=1,125,899,906,842,624B=1PiB]
 SI Units: Hard disk industry disk size measurements:
 [KB] [MB] [GB] [TB]
 [10^3B=1,000B=1KB]
 [10^6B=1,000,000B=1MB]
 [10^9B=1,000,000,000B=1GB]
 [10^12B=1,000,000,000,000B=1TB]
 [10^15B=1,000,000,000,000,000B=1PB]



--
 DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
 OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
 Free app hosting. Or install the open source package on any LAMP server.
 Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!

http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk
 ___
 Mingw-w64-public mailing list
 Mingw-w64-public@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

--
DreamFactory - Open Source REST  JSON Services for HTML5  Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471iu=/4140/ostg.clktrk___
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public