mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-26 11:33:45 +08:00
* elfcode.h (bfd_section_from_shdr): Only set SEC_DATA for a
SHF_PROGBITS or SHT_STRTAB section if SEC_ALLOC is set. Never set SEC_DATA for a SHF_NOBITS section. * nlm32-i386.c (nlm_i386_mangle_relocs): Check SEC_LOAD rather than SEC_CODE | SEC_DATA. Add some casts to avoid warnings. * nlmcode.h: Add some casts to avoid warnings. (nlm_write_object_contents): Ignore relocs for sections that are neither code nor data. Just use the symbol value for debugging symbols; don't offset by the section vma.
This commit is contained in:
parent
2a1bb52757
commit
36d541b1c7
@ -1,3 +1,16 @@
|
||||
Mon Sep 20 19:18:10 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* elfcode.h (bfd_section_from_shdr): Only set SEC_DATA for a
|
||||
SHF_PROGBITS or SHT_STRTAB section if SEC_ALLOC is set. Never set
|
||||
SEC_DATA for a SHF_NOBITS section.
|
||||
|
||||
* nlm32-i386.c (nlm_i386_mangle_relocs): Check SEC_LOAD rather
|
||||
than SEC_CODE | SEC_DATA. Add some casts to avoid warnings.
|
||||
* nlmcode.h: Add some casts to avoid warnings.
|
||||
(nlm_write_object_contents): Ignore relocs for sections that are
|
||||
neither code nor data. Just use the symbol value for debugging
|
||||
symbols; don't offset by the section vma.
|
||||
|
||||
Fri Sep 17 18:08:55 1993 Ian Lance Taylor (ian@tweedledumb.cygnus.com)
|
||||
|
||||
* reloc.c (bfd_perform_relocation): Don't return an error when
|
||||
|
@ -482,7 +482,7 @@ DEFUN (bfd_section_from_shdr, (abfd, shindex),
|
||||
|
||||
if (hdr->sh_flags & SHF_EXECINSTR)
|
||||
newsect->flags |= SEC_CODE; /* FIXME: may only contain SOME code */
|
||||
else
|
||||
else if (newsect->flags & SEC_ALLOC)
|
||||
newsect->flags |= SEC_DATA;
|
||||
|
||||
hdr->rawdata = (void *) newsect;
|
||||
@ -509,10 +509,10 @@ DEFUN (bfd_section_from_shdr, (abfd, shindex),
|
||||
if (!(hdr->sh_flags & SHF_WRITE))
|
||||
newsect->flags |= SEC_READONLY;
|
||||
|
||||
/* FIXME: This section is empty. Does it really make
|
||||
sense to set SEC_CODE for it? */
|
||||
if (hdr->sh_flags & SHF_EXECINSTR)
|
||||
newsect->flags |= SEC_CODE; /* FIXME: may only contain SOME code */
|
||||
else
|
||||
newsect->flags |= SEC_DATA;
|
||||
|
||||
hdr->rawdata = (void *) newsect;
|
||||
}
|
||||
@ -586,7 +586,7 @@ DEFUN (bfd_section_from_shdr, (abfd, shindex),
|
||||
newsect->flags |= SEC_READONLY;
|
||||
if (hdr->sh_flags & SHF_EXECINSTR)
|
||||
newsect->flags |= SEC_CODE;
|
||||
else
|
||||
else if (newsect->flags & SEC_ALLOC)
|
||||
newsect->flags |= SEC_DATA;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user