From 117ed4f8d5a9691c0bc1200d5d797e5211688c84 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Thu, 1 Jun 2006 03:45:58 +0000 Subject: * stabs.c (_bfd_link_section_stabs): Use bfd_make_section*_with_flags instead of bfd_make_section*. * aix386-core.c: Likewise. * aix5ppc-core.c: Likewise. * aout-adobe.c: Likewise. * aoutf1.h: Likewise. * binary.c: Likewise. * cisco-core.c: Likewise. * coff-arm.c: Likewise. * coff-h8300.c: Likewise. * elf.c: Likewise. * elf32-bfin.c: Likewise. * elf32-m32c.c: Likewise. * hppabsd-core.c: Likewise. * hpux-core.c: Likewise. * i386linux.c: Likewise. * ieee.c: Likewise. * ihex.c: Likewise. * irix-core.c: Likewise. * lynx-core.c: Likewise. * m68klinux.c: Likewise. * mach-o.c: Likewise. * netbsd-core.c: Likewise. * nlmcode.h: Likewise. * opncls.c: Likewise. * osf-core.c: Likewise. * peXXigen.c: Likewise. * ppcboot.c: Likewise. * ptrace-core.c: Likewise. * rs6000-core.c: Likewise. * sco5-core.c: Likewise. * sparclinux.c: Likewise. * srec.c: Likewise. * sunos.c: Likewise. * trad-core.c: Likewise. * xcofflink.c: Likewise. * xsym.c: Likewise. --- bfd/opncls.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'bfd/opncls.c') diff --git a/bfd/opncls.c b/bfd/opncls.c index 7e62d06..4131f9d 100644 --- a/bfd/opncls.c +++ b/bfd/opncls.c @@ -1345,6 +1345,7 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename) { asection *sect; bfd_size_type debuglink_size; + flagword flags; if (abfd == NULL || filename == NULL) { @@ -1363,16 +1364,11 @@ bfd_create_gnu_debuglink_section (bfd *abfd, const char *filename) return NULL; } - sect = bfd_make_section (abfd, GNU_DEBUGLINK); + flags = SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING; + sect = bfd_make_section_with_flags (abfd, GNU_DEBUGLINK, flags); if (sect == NULL) return NULL; - if (! bfd_set_section_flags (abfd, sect, - SEC_HAS_CONTENTS | SEC_READONLY | SEC_DEBUGGING)) - /* XXX Should we delete the section from the bfd ? */ - return NULL; - - debuglink_size = strlen (filename) + 1; debuglink_size += 3; debuglink_size &= ~3; -- cgit v1.1