Re: gnome 2.8.0 and external dependencies

2004-10-03 Thread Gerrit P. Haase
Hello Charles,

Am Sonntag, 3. Oktober 2004 um 06:49 schriebst du:

 Gerrit P. Haase wrote:

 Well, you have a struct that is const, so it never changes and new gcc
 puts the whole struct into .rdata

  static const
  struct poptOption cl_libIDL_callback_options[] = {
  [snip]


 But the important part is that INSIDE the struct, one of the 
 initialized fields contains the address of a variable.  In this case,
 although you didn't show it, it's the address of the variable into which
 popt is supposed to store the argument for one of the command line 
 options.  E.g. (going from memory)
 struct {
   option = --bob
   short_option = -b
   type = POPT_INTEGER
   value = my_variable    right here
   helpstr = blah blah blah
};
 So, what's supposed to happen (from popt's perspective) is that the user
 types --bob 12 and popt will parse the 12 and store it into my_variable.

 However, my_variable is a DATA export from your DLL (it has to be an
 export, so that popt can see it).

 But the address of DATA exports from DLLs is unknown at link time.  The
 Windows Runtime Loader has special code (coupled with 
 declspec(dllexport)/declspec(dllimport)) to fixup this address at 
 runtime.  To avoid declspec hell, on cygwin and mingw, the platform,
 compiler and linker cooperate to do something similar, fixing up the
 address at runtime to be a function pointer to a trampoline, which 
 eventually makes it all work.

 But it is necessary, in both normal windows and cygwin's 
 pseudo-runtime-reloc, to UPDATE the address stored in the struct for
 my_variable.

 But the struct is in .rdata and its contents cannot be changed at runtime.

 Better?


Yes, cool.  Now I think I can distinguish between 'wrong' and valid
const struct definitions.  May I consider using 'const' for structs
which are not really constant (i.e. containig a variable) as harmful?

Gerrit
-- 
=^..^=




Re: gnome 2.8.0 and external dependencies

2004-10-03 Thread Gerrit P. Haase
Hello Yaakov

[snip]

 Second, remove all symbols with two leading underscores, remove all
 garbage and newlines and see which symbols are remaining.  We should
 create a handy script to do this.

 Now, since I found a way around this problem, I think I'll have a
 version of libbonobo and GConf ready for testing tomorrow.

It is difficult.  Most of the relevant code in libbonobo is generated
by the idl compiler, so this compiler needs to generate valid code.
I try to figure out where to change it. 


Gerrit
-- 
=^..^=




Re: gnome 2.8.0 and external dependencies

2004-10-03 Thread Gerrit P. Haase
Hello Yaakov

 It is difficult.  Most of the relevant code in libbonobo is generated
 by the idl compiler, so this compiler needs to generate valid code.
 I try to figure out where to change it. 

I have changed two things in ORBit:

1. enable build of a running compiler on Cygwin, removed const in one
struct in file src/idl-compiler/orbit-idl-main.c.
2. changed the parts code is generated, affected files:
include/orbit/orb-core/corba-orb-type.h
include/orbit/orb-core/corba-typecode.h
src/idl-compiler/orbit-idl-c-headers.c
src/idl-compiler/orbit-idl-c-typecode.c
src/orb/orb-core/corba-typecode.c

With these changes I was able to build executables from the libbonobo
package which is running, however, I cannot say if it is also
working;)

The patch is attached, could you please try and see if it still
generates valid code?


Gerrit
-- 
=^..^=


ORBit2-2.12.0-gerrit.patch
Description: Binary data


Re: gnome 2.8.0 and external dependencies

2004-10-03 Thread Charles Wilson
Gerrit P. Haase wrote:

Yes, cool.  Now I think I can distinguish between 'wrong' and valid
const struct definitions.  May I consider using 'const' for structs
which are not really constant (i.e. containig a variable) as harmful?
Yes.  But also, structs which contain the (usually constant on all but 
braindead platforms, like Winblows) ADDRESS of a variable which is 
imported from a shared lib (DLL), are also not allowed to be const.

--
Chuck


Re: gnome 2.8.0 and external dependencies

2004-10-03 Thread Bobby McNulty Junior
Charles Wilson wrote:
Gerrit P. Haase wrote:

Yes, cool.  Now I think I can distinguish between 'wrong' and valid
const struct definitions.  May I consider using 'const' for structs
which are not really constant (i.e. containig a variable) as harmful?

Yes.  But also, structs which contain the (usually constant on all but 
braindead platforms, like Winblows) ADDRESS of a variable which is 
imported from a shared lib (DLL), are also not allowed to be const.

--
Chuck

Windows now has more security features.
It's blocking the popup I get from someone one the internet.
This morning, I only had two popup, both ActiveX was blocked.
I was not using Internet Explorer or Netscape when these popups appeared.
Its not Windows thats the problem. Its the hackers who want to get users 
into Linux or Unix.
Linux can act act many things, including an attack base on Windows

This system is proteted by Zone Alarm.
So hackers, hacking into this system is not wise. I can see you