* [PATCH] dwarf2read: Allow SEC_ALLOC sections to be located at address 0
@ 2015-07-11 1:01 Kevin Buettner
2015-07-14 11:56 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2015-07-11 1:01 UTC (permalink / raw)
To: gdb-patches
GDB already allows statically initialized variables, located in
SEC_LOAD sections, to be placed at address 0. This change allows
uninitialized variables (which are in SEC_ALLOC sections) to be placed
address 0 as well.
gdb/ChangeLog:
* dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero
to be set for SEC_ALLOC sections too.
---
gdb/dwarf2read.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c
index 496b74f..f498a3a 100644
--- a/gdb/dwarf2read.c
+++ b/gdb/dwarf2read.c
@@ -2241,7 +2241,7 @@ dwarf2_locate_sections (bfd *abfd, asection *sectp, void *vnames)
dwarf2_per_objfile->gdb_index.size = bfd_get_section_size (sectp);
}
- if ((bfd_get_section_flags (abfd, sectp) & SEC_LOAD)
+ if ((bfd_get_section_flags (abfd, sectp) & (SEC_LOAD | SEC_ALLOC))
&& bfd_section_vma (abfd, sectp) == 0)
dwarf2_per_objfile->has_section_at_zero = 1;
}
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dwarf2read: Allow SEC_ALLOC sections to be located at address 0
2015-07-11 1:01 [PATCH] dwarf2read: Allow SEC_ALLOC sections to be located at address 0 Kevin Buettner
@ 2015-07-14 11:56 ` Pedro Alves
2015-07-18 17:13 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2015-07-14 11:56 UTC (permalink / raw)
To: Kevin Buettner, gdb-patches
On 07/11/2015 02:01 AM, Kevin Buettner wrote:
> GDB already allows statically initialized variables, located in
> SEC_LOAD sections, to be placed at address 0. This change allows
> uninitialized variables (which are in SEC_ALLOC sections) to be placed
> address 0 as well.
>
> gdb/ChangeLog:
>
> * dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero
> to be set for SEC_ALLOC sections too.
LGTM.
Thanks,
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dwarf2read: Allow SEC_ALLOC sections to be located at address 0
2015-07-14 11:56 ` Pedro Alves
@ 2015-07-18 17:13 ` Kevin Buettner
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2015-07-18 17:13 UTC (permalink / raw)
To: gdb-patches
On Tue, 14 Jul 2015 12:56:30 +0100
Pedro Alves <palves@redhat.com> wrote:
> On 07/11/2015 02:01 AM, Kevin Buettner wrote:
> > GDB already allows statically initialized variables, located in
> > SEC_LOAD sections, to be placed at address 0. This change allows
> > uninitialized variables (which are in SEC_ALLOC sections) to be placed
> > address 0 as well.
> >
> > gdb/ChangeLog:
> >
> > * dwarf2read.c (dwarf2_locate_sections): Allow has_section_at_zero
> > to be set for SEC_ALLOC sections too.
>
> LGTM.
I've pushed this.
Thanks for looking it over.
Kevin
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-18 17:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-11 1:01 [PATCH] dwarf2read: Allow SEC_ALLOC sections to be located at address 0 Kevin Buettner
2015-07-14 11:56 ` Pedro Alves
2015-07-18 17:13 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).