aboutsummaryrefslogtreecommitdiff
path: root/bfd
diff options
context:
space:
mode:
authorDave Anglin <dave.anglin@nrc.ca>2004-11-20 16:54:15 +0000
committerDave Anglin <dave.anglin@nrc.ca>2004-11-20 16:54:15 +0000
commit3dd2fcf06b966589f6e2beeda12f122e56eae313 (patch)
treea0f9b2be7c7e86ce4a6164219569628a145257f8 /bfd
parentf1bc22da7241ea978b2ac518c3cb9fb3cb04c836 (diff)
downloadgdb-3dd2fcf06b966589f6e2beeda12f122e56eae313.zip
gdb-3dd2fcf06b966589f6e2beeda12f122e56eae313.tar.gz
gdb-3dd2fcf06b966589f6e2beeda12f122e56eae313.tar.bz2
* hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
make_bfd_asection.
Diffstat (limited to 'bfd')
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/hpux-core.c21
2 files changed, 17 insertions, 9 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index a65a887..b81ee1b 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2004-11-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * hpux-core.c (hpux_core_core_file_p): Use offsetof macro in calls to
+ make_bfd_asection.
+
2004-11-19 Alan Modra <amodra@bigpond.net.au>
* elf32-arm.c (elf32_arm_finish_dynamic_sections): Warning fix.
diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c
index 347de21..e19dcf5 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;