public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* RE: rebase for setup (curl)
@ 2002-01-04  8:47 Roth, Kevin P.
  2002-01-04 10:49 ` Jason Tishler
  0 siblings, 1 reply; 19+ messages in thread
From: Roth, Kevin P. @ 2002-01-04  8:47 UTC (permalink / raw)
  To: Jason Tishler; +Cc: Cygwin

Negative - I get no warnings at all during the building of
cygcurl-2.dll.

Here's the gcc line that actually dumps out the dll:

$  gcc -Wl,--base-file,.libs/cygcurl-2.dll-base -Wl,--dll -nostartfiles
-Wl,-e,
__cygwin_dll_entry@12 -o .libs/cygcurl-2.dll  file.lo timeval.lo
base64.lo host
ip.lo progress.lo formdata.lo cookie.lo http.lo sendf.lo ftp.lo url.lo
dict.lo
if2ip.lo speedcheck.lo getdate.lo ldap.lo ssluse.lo version.lo getenv.lo
escape
.lo mprintf.lo telnet.lo getpass.lo netrc.lo getinfo.lo transfer.lo
strequal.lo
 easy.lo security.lo krb4.lo memdebug.lo http_chunks.lo strtok.lo
connect.lo  -
lssl -lcrypto

I can send more of the build output if you'd like, or feel free to grab
the
source and run it yourself if you like (my commands, straight-forward
though
they may be, are all documented in my readme).

--Kevin



-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: Friday, January 04, 2002 9:26 AM

Kevin,

On Thu, Jan 03, 2002 at 10:11:48AM -0500, Roth, Kevin P. wrote:
> > Determine why cygcurl-2.dll and possibly other DLLs do not 
> > tolerate rebasing.
> 
> I'm the curl maintainer.
> 
> Fair warning - I'm probably not going to be much help here
> (as far as figuring out why it's not relocatable), however
> if you can tell me what to do to fix it, or have any questions
> you want me to try and answer, I'll do my best.

Thanks for your offer to help.

Do you get any auto-import warnings during the building of
cygcurl-2.dll?
For example:

    Warning: resolving _stdscr by linking to __imp__stdscr (auto-import)


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-04  8:47 rebase for setup (curl) Roth, Kevin P.
@ 2002-01-04 10:49 ` Jason Tishler
  2002-01-04 10:58   ` Norman Vine
  2002-01-04 14:44   ` Robert Collins
  0 siblings, 2 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-04 10:49 UTC (permalink / raw)
  To: Cygwin; +Cc: Roth, Kevin P.

On Fri, Jan 04, 2002 at 11:47:32AM -0500, Roth, Kevin P. wrote:
> Negative - I get no warnings at all during the building of
> cygcurl-2.dll.

Thanks for the confirmation.

> Here's the gcc line that actually dumps out the dll:
> 
> $  gcc -Wl,--base-file,.libs/cygcurl-2.dll-base -Wl,--dll -nostartfiles
> -Wl,-e, __cygwin_dll_entry@12 -o .libs/cygcurl-2.dll file.lo ...
> 
> I can send more of the build output if you'd like, or feel free to grab
> the source and run it yourself if you like (my commands, straight-forward
> though they may be, are all documented in my readme).

Actually, the above was very useful -- it got me thinking about PostgreSQL
DLLs, since they are made in an unconventional way.

Sure enough, rebase breaks pq.dll (one of the PostgreSQL DLLs) in exactly
the same way as cygcurl-2.dll:

    $ file pq.dll 
    pq.dll: MS Windows PE Intel 80386 console DLL
    $ objdump -p pq.dll | fgrep ImageBase
    ImageBase               67980000
    $ rebase -d -b 0x68000000 pq.dll 
    pq.dll: new base = 68000000, new size = 20000
    $ objdump -p pq.dll | fgrep ImageBase
    objdump: pq.dll: File format not recognized
    $ file pq.dll 
    pq.dll: MS-DOS executable (EXE), OS/2 or MS Windows

All PostgreSQL DLLs are created with dllwrap.  If I invoke dllwrap with
the verbose flag, we get the following:

    $ dllwrap -v -o pq.dll --dllname pq.dll --def pq.def fe-auth.o ...
    DLLTOOL name    : dlltool
    DLLTOOL options :  -v --dllname pq.dll --exclude-symbol=_cygwin_dll_entry@12 --def pq.def
    DRIVER name     : gcc
    DRIVER options  : -Wl,--dll -nostartfiles -o pq.dll -Wl,-e,__cygwin_dll_entry@12 -Wl,--image-base,0x67980000
    ...

So, the options passed to ld are the same for cygcurl-2.dll and pq.dll
except for the slight variation of --base-file versus --image-base.

I decided to table the search for the "offending" ld option(s) because
of the following gloomy thought:

    Given that rebase can break certain DLLs and that it is nearly
    impossible to control how arbitrary packages create their DLLs,
    can setup.exe's proposed rebase solution deal with this problem?
    Or, is the rebase solution doomed to failure?

Does anyone have any bright ideas?

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: rebase for setup (curl)
  2002-01-04 10:49 ` Jason Tishler
@ 2002-01-04 10:58   ` Norman Vine
  2002-01-04 12:15     ` Jason Tishler
  2002-01-04 14:39     ` Robert Collins
  2002-01-04 14:44   ` Robert Collins
  1 sibling, 2 replies; 19+ messages in thread
From: Norman Vine @ 2002-01-04 10:58 UTC (permalink / raw)
  To: 'Jason Tishler', 'Cygwin'; +Cc: 'Roth, Kevin P.'

Jason Tishler writes:
>>
>So, the options passed to ld are the same for cygcurl-2.dll and pq.dll
>except for the slight variation of --base-file versus --image-base.
>
>I decided to table the search for the "offending" ld option(s) because
>of the following gloomy thought:
>
>    Given that rebase can break certain DLLs and that it is nearly
>    impossible to control how arbitrary packages create their DLLs,
>    can setup.exe's proposed rebase solution deal with this problem?
>    Or, is the rebase solution doomed to failure?
>
>Does anyone have any bright ideas?

What happens if you link with
--enable-auto-image-base   ??

Cheers

Norman

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-04 10:58   ` Norman Vine
@ 2002-01-04 12:15     ` Jason Tishler
  2002-01-04 14:39     ` Robert Collins
  1 sibling, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-04 12:15 UTC (permalink / raw)
  To: Norman Vine; +Cc: 'Cygwin', 'Roth, Kevin P.'

On Fri, Jan 04, 2002 at 02:02:01PM -0500, Norman Vine wrote:
> Jason Tishler writes:
> >Does anyone have any bright ideas?
> 
> What happens if you link with --enable-auto-image-base   ??

I was unable to get dllwrap to use --enable-auto-image-base, but I was
able to build pq.dll using the normal "gcc -shared" way.  I ran the full
PostgreSQL regression test using this pq.dll without any errors.

But, the above is not the point.  The point is it will be difficult to
get the upstream maintainers to change their build procedures just for
Cygwin.  So, how should Cygwin's rebase solution handle these odd-balls?
Skip them, rebase around them (if possible), what?

BTW, guess what value dllwrap used for --image-base?  The same one used
by --enable-auto-image-base!

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-04 10:58   ` Norman Vine
  2002-01-04 12:15     ` Jason Tishler
@ 2002-01-04 14:39     ` Robert Collins
  1 sibling, 0 replies; 19+ messages in thread
From: Robert Collins @ 2002-01-04 14:39 UTC (permalink / raw)
  To: nhv, 'Jason Tishler', 'Cygwin'; +Cc: 'Roth, Kevin P.'


===
----- Original Message -----
From: "Norman Vine" <nhv@cape.com>
To: "'Jason Tishler'" <jason@tishler.net>; "'Cygwin'"
<cygwin@sources.redhat.com>
Cc: "'Roth, Kevin P.'" <KPRoth@MarathonOil.com>
Sent: Saturday, January 05, 2002 6:02 AM
Subject: RE: rebase for setup (curl)


> Jason Tishler writes:
> >>
> >So, the options passed to ld are the same for cygcurl-2.dll and
pq.dll
> >except for the slight variation of --base-file versus --image-base.
> >
> >I decided to table the search for the "offending" ld option(s)
because
> >of the following gloomy thought:
> >
> >    Given that rebase can break certain DLLs and that it is nearly
> >    impossible to control how arbitrary packages create their DLLs,
> >    can setup.exe's proposed rebase solution deal with this problem?
> >    Or, is the rebase solution doomed to failure?
> >
> >Does anyone have any bright ideas?
>
> What happens if you link with
> --enable-auto-image-base   ??

From a libbfd point of view, all auto-image-base does is
supply --image-base=<hash of filename>, so I'd be _amazed_ if this fixed
a relocating issue.

Rob


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-04 10:49 ` Jason Tishler
  2002-01-04 10:58   ` Norman Vine
@ 2002-01-04 14:44   ` Robert Collins
  2002-01-07  6:31     ` Jason Tishler
  1 sibling, 1 reply; 19+ messages in thread
From: Robert Collins @ 2002-01-04 14:44 UTC (permalink / raw)
  To: Jason Tishler, Cygwin; +Cc: Roth, Kevin P.


----- Original Message -----
From: "Jason Tishler" <jason@tishler.net>


> On Fri, Jan 04, 2002 at 11:47:32AM -0500, Roth, Kevin P. wrote:
> > Negative - I get no warnings at all during the building of
> > cygcurl-2.dll.
>
> Thanks for the confirmation.

> All PostgreSQL DLLs are created with dllwrap.  If I invoke dllwrap
with

> So, the options passed to ld are the same for cygcurl-2.dll and pq.dll
> except for the slight variation of --base-file versus --image-base.
>
> I decided to table the search for the "offending" ld option(s) because
> of the following gloomy thought:
>
>     Given that rebase can break certain DLLs and that it is nearly
>     impossible to control how arbitrary packages create their DLLs,
>     can setup.exe's proposed rebase solution deal with this problem?
>     Or, is the rebase solution doomed to failure?

Time for a 2c opinion.

Looks like something is broken with dllwrap->ld interaction. Does
adding --shared fix this? Or perhaps the -Wl,--dll should be replaced
with --shared...

If we can isolate that, and release an updated dllwrap we've solved the
core fault. At that point IMO we can simply release, with a loud warning
that folk need to update and rebuild their .dlls _BECAUSE THEY ARE
CURRENTLY CORRUPT_.

Rebasing is a PE feature, if the .dll's are not surviving rebasing,
something is wrong - they probably won't survive relocation either.

Lastly, if you recall my suggestion about leaving unrebasable .dlls in
place, and rebasing around them, we can simply test a dll the first time
we see it and see if it survives. If not, we mark it's address space as
reserved and move along.

Rob


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-04 14:44   ` Robert Collins
@ 2002-01-07  6:31     ` Jason Tishler
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-07  6:31 UTC (permalink / raw)
  To: Robert Collins; +Cc: Cygwin, Roth, Kevin P.

Rob,

On Sat, Jan 05, 2002 at 09:42:57AM +1100, Robert Collins wrote:
> ----- Original Message -----
> From: "Jason Tishler" <jason@tishler.net>
> > I decided to table the search for the "offending" ld option(s) because
> > of the following gloomy thought:
> >
> >     Given that rebase can break certain DLLs and that it is nearly
> >     impossible to control how arbitrary packages create their DLLs,
> >     can setup.exe's proposed rebase solution deal with this problem?
> >     Or, is the rebase solution doomed to failure?
> 
> Time for a 2c opinion.
> 
> Looks like something is broken with dllwrap->ld interaction. Does
> adding --shared fix this? Or perhaps the -Wl,--dll should be replaced
> with --shared...
> 
> [snip]

False alarm or the boy who cried wolf...

I just built pq.dll and cygcurl-2.dll using their standard makefiles
and they were rebase-able.  This explains why my gcc -shared experiment
"worked" last week.

However, the pq.dll (and other PostgreSQL 7.1.3 DLLs) that I built over
the summer with an older (i.e., previous?) version of gcc/binutils is
not rebase-able.

So, with the latest tools there does *not* seem to be a problem.

Kevin, what version of gcc/binutils are you using?  Are they the latest?

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: rebase for setup (curl)
@ 2002-01-15 11:54 Roth, Kevin P.
  0 siblings, 0 replies; 19+ messages in thread
From: Roth, Kevin P. @ 2002-01-15 11:54 UTC (permalink / raw)
  To: Jason Tishler; +Cc: cygwin

Yep - that info ended up in the bit bucket... Sorry.

--Kevin


-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: Tuesday, January 15, 2002 11:57 AM

I know the above.  What I was trying to determine is what binutils
version you had installed when you built your curl-7.9.2-1 distribution.
If the information is lost, then c'est la vie...



On Tue, Jan 15, 2002 at 10:39:17AM -0500, Roth, Kevin P. wrote:
> although I'm pretty sure when I prepared those three sample
> DLLs to mail to you, I had the latest on my machine...

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-15  8:51 Roth, Kevin P.
@ 2002-01-15  9:34 ` Jason Tishler
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-15  9:34 UTC (permalink / raw)
  To: Roth, Kevin P.; +Cc: Cygwin

Kevin,

On Tue, Jan 15, 2002 at 10:39:17AM -0500, Roth, Kevin P. wrote:
> although I'm pretty sure when I prepared those three sample
> DLLs to mail to you, I had the latest on my machine...

I know the above.  What I was trying to determine is what binutils
version you had installed when you built your curl-7.9.2-1 distribution.
If the information is lost, then c'est la vie...

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: rebase for setup (curl)
@ 2002-01-15  8:51 Roth, Kevin P.
  2002-01-15  9:34 ` Jason Tishler
  0 siblings, 1 reply; 19+ messages in thread
From: Roth, Kevin P. @ 2002-01-15  8:51 UTC (permalink / raw)
  To: Jason Tishler; +Cc: Cygwin

I don't have a copy of that info anymore. I suppose anything is
possible, although I'm pretty sure when I prepared those three sample
DLLs to mail to you, I had the latest on my machine...

--Kevin



-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: Tuesday, January 15, 2002 9:16 AM
To: Roth, Kevin P.
Cc: Cygwin
Subject: Re: rebase for setup (curl)


Kevin,

On Mon, Jan 14, 2002 at 01:22:09PM -0500, Roth, Kevin P. wrote:
> Don't have any idea at all why it didn't work before but now it does.

Are your sure that you weren't using an old binutils when you built the
non-rebase-able curl DLL?  I just checked my setup.log and I was using
binutils 20010425-2 when I built the non-rebase-able PostgreSQL DLLs.
Please check your setup.log to determine what binutils version that you
were using at the time.

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-14 10:27 Roth, Kevin P.
@ 2002-01-15  6:19 ` Jason Tishler
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-15  6:19 UTC (permalink / raw)
  To: Roth, Kevin P.; +Cc: Cygwin

Kevin,

On Mon, Jan 14, 2002 at 01:22:09PM -0500, Roth, Kevin P. wrote:
> Don't have any idea at all why it didn't work before but now it does.

Are your sure that you weren't using an old binutils when you built the
non-rebase-able curl DLL?  I just checked my setup.log and I was using
binutils 20010425-2 when I built the non-rebase-able PostgreSQL DLLs.
Please check your setup.log to determine what binutils version that you
were using at the time.

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: rebase for setup (curl)
@ 2002-01-14 10:27 Roth, Kevin P.
  2002-01-15  6:19 ` Jason Tishler
  0 siblings, 1 reply; 19+ messages in thread
From: Roth, Kevin P. @ 2002-01-14 10:27 UTC (permalink / raw)
  To: Jason Tishler, Cygwin

One more follow-up:

I'm not sure what I did, however I tried it while logged in as an
administrative user on my Win2K box (where all this started). It built
re-basable.

So, I tried again while logged in as a non-admin (same test as I ran
nearer the start of this thread). But this time, it builds re-basable!

Don't have any idea at all why it didn't work before but now it does.
Not sure if I care, unless it happens again. I will make every effort to
verify re-basability before releasing new versions, just in case this
crops up again...

Thanks for your help,
--Kevin



-----Original Message-----
From: Roth, Kevin P. 
Sent: Thursday, January 10, 2002 10:18 PM


On 8 Jan 2002, at 13:26, Jason Tishler wrote: 
> All of the above appear to be non-relocatable: 
> $ file *.dll 
> cygcurl-2.dll: MS Windows PE Intel 80386 console DLL not relocatable 
> 
> How did you manage to accomplish this? 


Well, I'm no closer to understanding why it didn't work on my Win2k box
at work. However, at home on my WinXP-pro box, it builds re-basable with
no difference in how I did it.

The only thing I can think of is that on my Win2k box, I don't usually
log in as an administrator; on my WinXP box, I also don't, but I did
while I ran this test...

I'll give it a try as an administrative account on Win2k and see if that
makes any difference - if so I'll let you all know.

Of course, you can expect my next curl package update to be built on my
WinXP box ;-) They're testing a new release now, so it should be within
a couple weeks.


> > Also, if testing for rebase-ability is simple, could you let me know

> > how? I'd be curious... 
> 
> http://www.tishler.net/jason/software/rebase/rebase.exe.bz2 
> 
> The following is a sample command line: 
> 
> rebase -d -b 0x68000000 cygcurl-2-*.dll 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-08 10:22 ` Jason Tishler
  2002-01-08 15:32   ` Gerrit P. Haase
@ 2002-01-10 19:18   ` Kevin Roth
  1 sibling, 0 replies; 19+ messages in thread
From: Kevin Roth @ 2002-01-10 19:18 UTC (permalink / raw)
  To: Jason Tishler, Cygwin, Roth, Kevin P.

<color><param>0100,0100,0100</param>On 8 Jan 2002, at 13:26, Jason Tishler wrote:

<color><param>7F00,0000,0000</param>> All of the above appear to be non-relocatable:

>   $ file *.dll

</color>>   cygcurl-2.dll:   MS Windows PE Intel 80386 <color><param>7F00,0000,0000</param>console DLL not relocatable

> 

> How did you manage to accomplish this?



</color>Well, I'm no closer to understanding why it didn't work on 
my Win2k box at work. However, at home on my WinXP-pro 
box, it builds re-basable with no different in how I did 
it.


The only thing I can think of is that on my Win2k box, I 
don't usually log in as an administrator; on my WinXP box, 
I also don't, but I did while I ran this test...


I'll give it a try as an administrative account on Win2k 
and see if that makes any difference - if so I'll let you 
all know.


Of course, you can expect my next curl package update to 
be built on my WinXP box ;-)  They're testing a new 
release now, so it should be within a couple weeks.



<color><param>7F00,0000,0000</param>> > Also, if testing for rebase-ability is simple, could you let me know

> > how? I'd be curious...

> 

>     http://www.tishler.net/jason/software/rebase/rebase.exe.bz2

> 

> The following is a sample command line:

> 

>     rebase -d -b 0x68000000 cygcurl-2-*.dll



</color>--Kevin

<nofill>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-08 19:22 Roth, Kevin P.
@ 2002-01-09  8:26 ` Jason Tishler
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-09  8:26 UTC (permalink / raw)
  To: Roth, Kevin P.; +Cc: Cygwin

Kevin,

On Tue, Jan 08, 2002 at 10:22:06PM -0500, Roth, Kevin P. wrote:
> -----Original Message-----
> From: Jason Tishler [mailto:jason@tishler.net]
> Sent: Tuesday, January 08, 2002 1:26 PM
> 
> > Kevin,
> > Please keep your replies on-list...
> 
> Normally I would, however I know attachments to lists are often not well
> liked, so I only sent them to you directly. Perhaps next time I'll reply
> to the list and just send the attachments separately...

Yes, the above is the better approach.

> >How did you manage to accomplish this?
> 
> I thought I was pretty clear with my directions for doing so ;-)
> Seriously, I haven't a clue.

Are you sure that nothing changed in your Cygwin environment?  If not,
that it is very strange that you are producing different DLLs with the
same commands.

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-08 15:32   ` Gerrit P. Haase
@ 2002-01-09  7:49     ` Jason Tishler
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-09  7:49 UTC (permalink / raw)
  To: Gerrit P. Haase @ cygwin

Gerrit,

On Tue, Jan 08, 2002 at 11:13:42PM +0100, Gerrit P. Haase wrote:
> That is funny, with my browser (IE) get just binary garbage:
> 
> BZh91AY&SYCF\x06#=U\x7fÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿàŽ…õxù¯4¦½¸ô÷­ö>ûï” >†$什¼ júz\x03í\x1a\x1e)
> ...

Sorry, I have no control over your browser and this web server.
Unfortunately, .bz2 are considered text (by default) by some web servers.

> yÝëâ\x10]ݹç[g¦¯o =<ößK±{ïƒ{½öó©íçj{vï½Ü5õñ\x1d×vg]ۮϪÜÚ{–wmnè=uÇ{ÃÞ ...

> Well, we have the great Cygwin toolchain, there is wget e.g.;)
> 
> $ wget http://www.tishler.net/jason/software/rebase/rebase.exe.bz2

I guess that I should have been explicit, but I assumed people would use
wget or another such tool.

> Please, Jason, tell me, where can I find more infos or the sources?

You can find more info on the MSDN site:

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tools/perfutil_2z39.asp
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/debug/imagehlp_1hut.asp

I previous posted the source:

    http://sources.redhat.com/ml/cygwin/2001-12/txt00005.txt

> In detail, I'm getting different error codes 5, 32, 487 like this
> and what is strange (I think), I'm geting not one of these errors
> running the same command in /usr/local/bin where I have just my own
> dll's, well libmysqlclient-11.dll was also build by myself...):

We have the following:

    $ egrep ' (5|32|487)L' /usr/include/w32api/winerror.h 
    #define ERROR_ACCESS_DENIED 5L
    #define ERROR_SHARING_VIOLATION 32L
    #define ERROR_INVALID_ADDRESS 487L

So maybe you are getting error 5 and 32 because the DLLs are in use?
I just got some 487s myself for nonexistent file -- I should have gotten
2.  But, then this problem went away -- sorry, I can't explain this
except for the standard MS excuse... :,)

During some rebase runs, I empirically determined that ReBaseImage()
searches your PATH when trying to find (relative) files!  Maybe this
was causing some of your grief -- your were not necessarily rebasing
the files that you thought you were?

I just made the following changes to rebase.cc:

    1. Display Posix instead of Win32 path names
    2. Display file name in ReBaseImage() error messages
    3. Pass absolute path names to ReBaseImage() to prevent it from
       searching the user's PATH.

You can find the latest source at:

    http://www.tishler.net/jason/software/rebase/rebase.cc

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* RE: rebase for setup (curl)
@ 2002-01-08 19:22 Roth, Kevin P.
  2002-01-09  8:26 ` Jason Tishler
  0 siblings, 1 reply; 19+ messages in thread
From: Roth, Kevin P. @ 2002-01-08 19:22 UTC (permalink / raw)
  To: Jason Tishler; +Cc: Cygwin

-----Original Message-----
From: Jason Tishler [mailto:jason@tishler.net]
Sent: Tuesday, January 08, 2002 1:26 PM

> Kevin,
> Please keep your replies on-list...

Normally I would, however I know attachments to lists are often not well
liked, so I only sent them to you directly. Perhaps next time I'll reply
to the list and just send the attachments separately...

> All of the above appear to be non-relocatable:
>    $ file *.dll
>    cygcurl-2-build.dll:   MS Windows PE Intel 80386 console DLL not
relocatable
>    cygcurl-2-install.dll: MS Windows PE Intel 80386 console DLL not
relocatable
>    cygcurl-2-strip.dll:   MS Windows PE Intel 80386 console DLL not
relocatable
>How did you manage to accomplish this?

I thought I was pretty clear with my directions for doing so ;-)
Seriously, I haven't a clue. I build under Windows 2000 professional, on
an IBM thinkpad T-20 laptop; 1 733 mhz processor and 256 MB RAM. No idea
how much of that really matters though...

--Kevin

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
  2002-01-08 10:22 ` Jason Tishler
@ 2002-01-08 15:32   ` Gerrit P. Haase
  2002-01-09  7:49     ` Jason Tishler
  2002-01-10 19:18   ` Kevin Roth
  1 sibling, 1 reply; 19+ messages in thread
From: Gerrit P. Haase @ 2002-01-08 15:32 UTC (permalink / raw)
  To: cygwin

Hallo Jason,

Am 2002-01-08 um 19:26 schriebst du:

> It is very simple.  Just download, uncompress, and install the following:

>     http://www.tishler.net/jason/software/rebase/rebase.exe.bz2

> into /usr/local/bin.

That is funny, with my browser (IE) get just binary garbage:

BZh91AY&SYCF\x06#=U\x7fÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿàŽ…õxù¯4¦½¸ô÷­ö>ûï” >†$什¼ júz\x03í\x1a\x1e)
÷¸ÑÛ\x0eæíJæîwÛï}÷Ü|{ï¹ sÛÚ­Ïjàõ³<7VÆr»w}Þy\x0eÛf²\x03§GA’…¶FÛl\x01në¾Ôùöñµ¹àûëé:úõ¹¹‡¬yO—’Þ
yÝëâ\x10]ݹç[g¦¯o =<ößK±{ïƒ{½öó©íçj{vï½Ü5õñ\x1d×vg]ۮϪÜÚ{–wmnè=uÇ{ÃÞ¶û÷¾áëÃèxøô=6½\x1fs}...

> The following is a sample command line:

>     rebase -d -b 0x68000000 cygcurl-2-*.dll

Well, we have the great Cygwin toolchain, there is wget e.g.;)

$ wget http://www.tishler.net/jason/software/rebase/rebase.exe.bz2
--22:59:59--  http://www.tishler.net/jason/software/rebase/rebase.exe.bz2
           => `rebase.exe.bz2'
Connecting to www.tishler.net:80... connected!
HTTP request sent, awaiting response... 200 OK
Length: 38,012 [text/html]                 <------------------Text/HTML?

    0K .......... .......... .......... .......              100% @   8.15 KB/s

23:00:04 (8.15 KB/s) - `rebase.exe.bz2' saved [38012/38012]

But it works!

$ ./rebase.exe
usage: rebase -b BaseAddress [-d] -o Offset ImageFileName ...

Please, Jason, tell me, where can I find more infos or the sources?
In detail, I'm getting different error codes 5, 32, 487 like this
and what is strange (I think), I'm geting not one of these errors
running the same command in /usr/local/bin where I have just my own
dll's, well libmysqlclient-11.dll was also build by myself...):

$ for i in *.dll; do rebase -d -b 0x68000000 $i; done

Scintilla.dll: new base = 67fd0000, new size = 30000
ReBaseImage() failed with last error = 32

cygXpm-X4.dll: new base = 67ff0000, new size = 10000
ReBaseImage() failed with last error = 32

cygcom_err-1.dll: new base = 67ff0000, new size = 10000
ReBaseImage() failed with last error = 32

cygcurl-2.dll: new base = 68000000, new size = 0
ReBaseImage() failed with last error = 32

cygform6.dll: new base = 67ff0000, new size = 10000
ReBaseImage() failed with last error = 32

cygjbig1.dll: new base = 67ff0000, new size = 10000
ReBaseImage() failed with last error = 32

cygncurses5.dll: new base = 67fc0000, new size = 40000
ReBaseImage() failed with last error = 32

cygpng.dll: new base = 67fc0000, new size = 40000
ReBaseImage() failed with last error = 32

cygss-0.dll: new base = 67fe0000, new size = 20000
ReBaseImage() failed with last error = 32

cygtcl80.dll: new base = 67f90000, new size = 70000
ReBaseImage() failed with last error = 487

cygtclreg80.dll: new base = 67ff0000, new size = 10000
ReBaseImage() failed with last error = 32

cygwin1-uinfo.dll: new base = 67c20000, new size = 3e0000
ReBaseImage() failed with last error = 32

cygxsltbreakpoint-1.dll: new base = 67ff0000, new size = 10000
ReBaseImage() failed with last error = 32

glut32.dll: new base = 67fc0000, new size = 40000
ReBaseImage() failed with last error = 32

libmysqlclient-11.dll: new base = 67ea0000, new size = 160000
ReBaseImage() failed with last error = 32
ReBaseImage() failed with last error = 5

pq++.dll: new base = 68000000, new size = 0
ReBaseImage() failed with last error = 32

Gerrit
-- 
=^..^=                                        mailto:gp@familiehaase.de


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
       [not found] <6EB31774D39507408D04392F40A10B2BC1FEA7@FDYEXC202.mgroupnet.com>
@ 2002-01-08 10:22 ` Jason Tishler
  2002-01-08 15:32   ` Gerrit P. Haase
  2002-01-10 19:18   ` Kevin Roth
  0 siblings, 2 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-08 10:22 UTC (permalink / raw)
  To: Roth, Kevin P.; +Cc: Cygwin

Kevin,

Please keep your replies on-list...

On Mon, Jan 07, 2002 at 10:08:09AM -0500, Roth, Kevin P. wrote:
> gcc 2.95.3-5
> binutils 20011002-1

So you are using the latest too.

> Attached are three DLLs in a tar/bz2 file. They are as follows:
> 
>  cygcurl-2-build.dll : rebuilt last Friday, from the 7.9.2-1 sources
> 
>  cygcurl-2-install.dll : same as above, but after performing a make
> install (in case that actually changes something)
> 
>  cygcurl-2-strip.dll : after `make install`, I did `strip cygcurl-2.dll`.
> Let me know how these look.

All of the above appear to be non-relocatable:

    $ file *.dll
    cygcurl-2-build.dll:   MS Windows PE Intel 80386 console DLL not relocatable
    cygcurl-2-install.dll: MS Windows PE Intel 80386 console DLL not relocatable
    cygcurl-2-strip.dll:   MS Windows PE Intel 80386 console DLL not relocatable

How did you manage to accomplish this?

> Also, if testing for rebase-ability is simple, could you let me know
> how? I'd be curious...

It is very simple.  Just download, uncompress, and install the following:

    http://www.tishler.net/jason/software/rebase/rebase.exe.bz2

into /usr/local/bin.

The following is a sample command line:

    rebase -d -b 0x68000000 cygcurl-2-*.dll

Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: rebase for setup (curl)
       [not found] <6EB31774D39507408D04392F40A10B2BC1FEA1@FDYEXC202.mgroupnet.com>
@ 2002-01-04  6:21 ` Jason Tishler
  0 siblings, 0 replies; 19+ messages in thread
From: Jason Tishler @ 2002-01-04  6:21 UTC (permalink / raw)
  To: Roth, Kevin P.; +Cc: Cygwin

Kevin,

On Thu, Jan 03, 2002 at 10:11:48AM -0500, Roth, Kevin P. wrote:
> > Determine why cygcurl-2.dll and possibly other DLLs do not 
> > tolerate rebasing.
> 
> I'm the curl maintainer.
> 
> Fair warning - I'm probably not going to be much help here
> (as far as figuring out why it's not relocatable), however
> if you can tell me what to do to fix it, or have any questions
> you want me to try and answer, I'll do my best.

Thanks for your offer to help.

Do you get any auto-import warnings during the building of cygcurl-2.dll?
For example:

    Warning: resolving _stdscr by linking to __imp__stdscr (auto-import)

Thanks,
Jason

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2002-01-15 18:20 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-01-04  8:47 rebase for setup (curl) Roth, Kevin P.
2002-01-04 10:49 ` Jason Tishler
2002-01-04 10:58   ` Norman Vine
2002-01-04 12:15     ` Jason Tishler
2002-01-04 14:39     ` Robert Collins
2002-01-04 14:44   ` Robert Collins
2002-01-07  6:31     ` Jason Tishler
  -- strict thread matches above, loose matches on Subject: below --
2002-01-15 11:54 Roth, Kevin P.
2002-01-15  8:51 Roth, Kevin P.
2002-01-15  9:34 ` Jason Tishler
2002-01-14 10:27 Roth, Kevin P.
2002-01-15  6:19 ` Jason Tishler
2002-01-08 19:22 Roth, Kevin P.
2002-01-09  8:26 ` Jason Tishler
     [not found] <6EB31774D39507408D04392F40A10B2BC1FEA7@FDYEXC202.mgroupnet.com>
2002-01-08 10:22 ` Jason Tishler
2002-01-08 15:32   ` Gerrit P. Haase
2002-01-09  7:49     ` Jason Tishler
2002-01-10 19:18   ` Kevin Roth
     [not found] <6EB31774D39507408D04392F40A10B2BC1FEA1@FDYEXC202.mgroupnet.com>
2002-01-04  6:21 ` Jason Tishler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).