Commit d7d04420 authored by strauman's avatar strauman
Browse files

2010/03/17:

 - bfdstuff.c: Completely ignore zero-sized sections marked SEC_ALLOC
   (by removing the SEC_ALLOC flag) so that no section symbol is
   recorded. Since no space is allocated for such a section the
   value of a section symbol would be invalid and this results in
   gdb confusion...
parent 54df2758
Changes since CEXP-2.0.beta
2010/03/17:
- bfdstuff.c: Completely ignore zero-sized sections marked SEC_ALLOC
(by removing the SEC_ALLOC flag) so that no section symbol is
recorded. Since no space is allocated for such a section the
value of a section symbol would be invalid and this results in
gdb confusion...
2010/02/17:
- libtecla/getline.c: always include <sys/ioctl.h> (also under __rtems__)
in order to get TIOCGWINSZ.
......
......@@ -600,8 +600,14 @@ static void
s_nsects(bfd *abfd, asection *sect, PTR arg)
{
LinkData ld=(LinkData)arg;
if ( SEC_ALLOC & bfd_get_section_flags(ld->abfd, sect) )
ld->num_section_names++;
if ( SEC_ALLOC & bfd_get_section_flags(ld->abfd, sect) ) {
if ( 0 == bfd_section_size(ld->abfd, sect) ) {
/* Effectively remove zero-sized sections */
bfd_set_section_flags( ld->abfd, sect, bfd_get_section_flags( ld->abfd, sect ) & ~SEC_ALLOC);
} else {
ld->num_section_names++;
}
}
}
/* find basic sections and the number of sections which are
......@@ -1169,7 +1175,7 @@ int i,errs=0;
* redundant occurrencies have been de-SEC_ALLOCed
* from this module.
*/
if (SEC_ALLOC & bfd_get_section_flags(abfd, sect)) {
if ( (SEC_ALLOC & bfd_get_section_flags(abfd, sect)) ) {
sp->flags|=BSF_KEEP;
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment