public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [vms/committed]: Refine section and symbols flags
@ 2010-05-21 13:19 Tristan Gingold
  0 siblings, 0 replies; only message in thread
From: Tristan Gingold @ 2010-05-21 13:19 UTC (permalink / raw)
  To: binutils

Hi,

this patch refines the conversion for native to bfd section flags and symbol infos to improve the
output of objdump -h and nm.

Tristan.

bfd/
2010-05-21  Tristan Gingold  <gingold@adacore.com>

	* vms-alpha.c (_bfd_vms_slurp_eisd): Set SEC_HAS_CONTENTS and
	SEC_LOAD if isect has data.
	(vms_get_symbol_info): Refine the condition for 'T' type.


*** vms-alpha.c	18 May 2010 09:37:05 -0000	1.10
--- vms-alpha.c	21 May 2010 12:55:19 -0000
***************
*** 547,558 ****
  	 what's in each section without examining the data.  This is
  	 especially true of DWARF debug sections.  */
        bfd_flags = SEC_ALLOC;
  
        if (flags & EISD__M_EXE)
! 	bfd_flags |= SEC_CODE | SEC_HAS_CONTENTS | SEC_LOAD;
  
        if (flags & EISD__M_NONSHRADR)
! 	bfd_flags |= SEC_DATA | SEC_HAS_CONTENTS | SEC_LOAD;
  
        if (!(flags & EISD__M_WRT))
  	bfd_flags |= SEC_READONLY;
--- 547,560 ----
  	 what's in each section without examining the data.  This is
  	 especially true of DWARF debug sections.  */
        bfd_flags = SEC_ALLOC;
+       if (vbn != 0)
+         bfd_flags |= SEC_HAS_CONTENTS | SEC_LOAD;
  
        if (flags & EISD__M_EXE)
! 	bfd_flags |= SEC_CODE;
  
        if (flags & EISD__M_NONSHRADR)
! 	bfd_flags |= SEC_DATA;
  
        if (!(flags & EISD__M_WRT))
  	bfd_flags |= SEC_READONLY;
***************
*** 561,570 ****
  	bfd_flags |= SEC_DATA;
  
        if (flags & EISD__M_FIXUPVEC)
! 	bfd_flags |= SEC_DATA | SEC_HAS_CONTENTS | SEC_LOAD;
  
        if (flags & EISD__M_CRF)
! 	bfd_flags |= SEC_HAS_CONTENTS | SEC_LOAD;
  
        if (flags & EISD__M_GBL)
  	{
--- 563,572 ----
  	bfd_flags |= SEC_DATA;
  
        if (flags & EISD__M_FIXUPVEC)
! 	bfd_flags |= SEC_DATA;
  
        if (flags & EISD__M_GBL)
  	{
***************
*** 8944,8950 ****
      ret->type = 'U';
    else if (bfd_is_ind_section (sec))
      ret->type = 'I';
!   else if (bfd_get_section_flags (abfd, sec) & SEC_CODE)
      ret->type = 'T';
    else if (bfd_get_section_flags (abfd, sec) & SEC_DATA)
      ret->type = 'D';
--- 8946,8953 ----
      ret->type = 'U';
    else if (bfd_is_ind_section (sec))
      ret->type = 'I';
!   else if ((symbol->flags & BSF_FUNCTION)
!            || (bfd_get_section_flags (abfd, sec) & SEC_CODE))
      ret->type = 'T';
    else if (bfd_get_section_flags (abfd, sec) & SEC_DATA)
      ret->type = 'D';

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-05-21 13:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-21 13:19 [vms/committed]: Refine section and symbols flags Tristan Gingold

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).