[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug ld/4844] auto-import and const data import problem

From: nickc at redhat dot com
Subject: [Bug ld/4844] auto-import and const data import problem
Date: 2 Oct 2007 14:31:32 -0000

------- Additional Comments From nickc at redhat dot com  2007-10-02 14:31 
Subject: Re:  auto-import and const data import problem

Hi Eric,

>> Eric - I am not sure that making the .rdata section writeable is as simple
>> as it is for the .text section and I am not at all sure that this is
>> something that we want to do.
> Note that this is effectively what the patch does.

Point taken.

>> Wouldn't it be easier to have pe_find_data_imports() issue a warning
>> message if it has to auto import when the --enable-auto-import has not
>> been provided on the command line ?
> Easier sure, but you still end up with a broken binary. :-)

But only if you are using constant data structures.  (That need to be 
auto-imported ?)  And only if the user did not put --enable-auto-import on 
their command line.

The point is, I worry about the bugs that will be caused by putting read only 
data into the read/write data section.  (Or maybe the bugs that will not be 
caught by so doing).  This fix for auto-import is a hack and I would really 
prefer it if it was not the linker's default behaviour.  So to me, providing a 
warning message and telling the user of the command line option that they ought 
to be using is an acceptable compromise.  If a programmer's app starts to seg 
fault, then one thing they ought to do is go back over the build logs and look 
for any messages from the compiler and linker telling them of potential 




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]