* section.c (SEC_DEBUGGING): New section flag.

* elfcode.h (bfd_section_from_shdr): If section is SHT_PROGBITS,
	and the name starts with .debug, .line or .stab, set
	SEC_DEBUGGING.
	* elf32-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added
	SEC_DEBUGGING to section_flags.
	* elf64-target.h (TARGET_BIG_SYM, TARGET_LITTLE_SYM): Added
	SEC_DEBUGGING and SEC_CODE to section_flags.
	* bfd-in2.h: Updated.
This commit is contained in:
Ian Lance Taylor
1993-09-23 15:14:12 +00:00
parent 0c28fe8dd4
commit d6e5f95000
4 changed files with 23 additions and 4 deletions

View File

@ -485,6 +485,13 @@ DEFUN (bfd_section_from_shdr, (abfd, shindex),
else if (newsect->flags & SEC_ALLOC)
newsect->flags |= SEC_DATA;
/* The debugging sections appear to recognized only by
name. */
if (strncmp (name, ".debug", sizeof ".debug" - 1) == 0
|| strncmp (name, ".line", sizeof ".line" - 1) == 0
|| strncmp (name, ".stab", sizeof ".stab" - 1) == 0)
newsect->flags |= SEC_DEBUGGING;
hdr->rawdata = (void *) newsect;
}
else