This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: displays dynamic segment even if no .dynamic section


On Mon, 2007-06-25 at 14:42 +0200, Tristan Gingold wrote:
> currently dynamic segment of VMS itanium (ELF format) cannot be  
> displayed because there is no .dynamic section in the section table.
> This patch fixes the issue by always using dynamic segment unless  
> there is a .dynamic section.

I lack info and access to an Itanium VMS system.  Also, there is no
Itanium VMS support in FSF binutils.  Anyways, this means I can only go
by the info you have given me.

I'm puzzled about what exactly the failure case is here.  If there are
no section headers, then the existing code will already do what you
want.  If there are section headers, but no .dynamic section in the
headers (or a zero size .dynamic section), then the existing code will
give an error.  This is true even with your patch, so your patch does
not seem to fix the problem you have described.  Looking at the code,
the only case where the patch seems to do anything different is if there
are section headers, there is a .dynamic section in the headers, but the
dynamic section has SHT_NOBITS.  In this case, dynamic_addr is not set
without your patch, and is set with your patch.  However, it isn't clear
to me why you want to do this.  Why use the section if it is empty?  I'm
also not sure how a section can have non-zero size and SHT_NOBITS set,
but I'm not a linker expert.
-- 
Jim Wilson, GNU Tools Support, http://www.specifix.com



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]