diff options
author | Dave Anglin <dave.anglin@nrc.ca> | 2004-11-20 16:54:15 +0000 |
---|---|---|
committer | Dave Anglin <dave.anglin@nrc.ca> | 2004-11-20 16:54:15 +0000 |
commit | a7280fd7b1d9c6cac2b5db383a1a40975eb31d1d (patch) | |
tree | 5907d9d59de19172767fbc87ec0b5d3297a7a3a6 /bfd/hpux-core.c | |
parent | 02cd037a48644702f95a013633ee987cf53673b3 (diff) | |
download | binutils-redhat-a7280fd7b1d9c6cac2b5db383a1a40975eb31d1d.tar.gz |
* hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
make_bfd_asection.
Diffstat (limited to 'bfd/hpux-core.c')
-rw-r--r-- | bfd/hpux-core.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c index 347de2170f..e19dcf5e3c 100644 --- a/bfd/hpux-core.c +++ b/bfd/hpux-core.c @@ -244,10 +244,11 @@ hpux_core_core_file_p (abfd) if (core_kernel_thread_id (abfd) == 0) { if (!make_bfd_asection (abfd, ".reg", - SEC_HAS_CONTENTS, - core_header.len, - (int) &proc_info - (int) & proc_info.hw_regs, - 2)) + SEC_HAS_CONTENTS, + core_header.len, + (bfd_vma) offsetof (struct proc_info, + hw_regs), + 2)) goto fail; } else @@ -259,17 +260,19 @@ hpux_core_core_file_p (abfd) if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS, core_header.len, - (int) &proc_info - (int) & proc_info.hw_regs, + (bfd_vma)offsetof (struct proc_info, + hw_regs), 2)) goto fail; } /* We always make one of these sections, for every thread. */ sprintf (secname, ".reg/%d", core_kernel_thread_id (abfd)); if (!make_bfd_asection (abfd, secname, - SEC_HAS_CONTENTS, - core_header.len, - (int) &proc_info - (int) & proc_info.hw_regs, - 2)) + SEC_HAS_CONTENTS, + core_header.len, + (bfd_vma) offsetof (struct proc_info, + hw_regs), + 2)) goto fail; } core_signal (abfd) = proc_info.sig; |