This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] ld: Failing to copy processor specific flags for split-by-file
- From: Nick Clifton <nickc at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Tue, 07 Sep 2010 16:09:17 +0100
- Subject: Re: [PATCH] ld: Failing to copy processor specific flags for split-by-file
- References: <89AE14E37D740B4796DC14566DF6325ECB7D053AC1@SJEXCHCCR02.corp.ad.broadcom.com> <89AE14E37D740B4796DC14566DF6325ECB7DF68DD4@SJEXCHCCR02.corp.ad.broadcom.com>
Hi Andrew,
I was wondering if there was anything I could do that would
help get these patches merged?
Pinging the list like that was just the thing.
...or should I just be more patient :)
Actually it would also have helped if you had filed a bug report for
this problem with the bugzilla system. That way there would be a PR
number that we could refer to in changelog entries and comments in the code.
> I've attached two patches, split-test.patch, contains the test that
> highlights this problem.
Thanks. I have applied both patches. I also had to make up some
changelog entries for them (see below). If you can include such entries
yourself when submit patches in the future it will make things a little
bit easier.
> I'll be honest, I don't really understand
> what the "l" flag is used for, but I don't *think* that it makes any
> difference for the purpose of this test.
It doesn't make a huge difference, although there is a need for the
presence of an unusual flag, such as "l".
Using "l" did point out one other small problem to me, which was that
readelf was not explaining what "l" stands for in the "Key to Flags"
part of its output. So I created a small additional patch to do this.
Cheers
Nick
ld/ChangeLog
2010-09-07 Andrew Burgess <aburgess@broadcom.com>
* ldwrite.c (clone_section): Call bfd_copy_private_section_data on
newly cloned section.
ld/testsuite/ChangeLog
2010-09-07 Andrew Burgess <aburgess@broadcom.com>
* ld-x86-64/split-by-file.rd: New test.
* ld-x86-64/split-by-file1.s: New test source code.
* ld-x86-64/split-by-file2.s: New test source code.
* ld-x86-64/x86-64.exp: Run the new test.
readelf/ChangeLog
2010-09-07 Nick Clifton <nickc@redhat.com>
* readelf.c (process_section_headers): Mention meaning of 'l'
section flag for x86-64 targets.
Index: binutils/readelf.c
===================================================================
RCS file: /cvs/src/src/binutils/readelf.c,v
retrieving revision 1.514
retrieving revision 1.515
diff -c -3 -p -r1.514 -r1.515
*** binutils/readelf.c 23 Aug 2010 13:51:39 -0000 1.514
--- binutils/readelf.c 7 Sep 2010 15:02:17 -0000 1.515
*************** process_section_headers (FILE * file)
*** 4861,4870 ****
}
if (!do_section_details)
! printf (_("Key to Flags:\n\
W (write), A (alloc), X (execute), M (merge), S (strings)\n\
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
return 1;
}
--- 4861,4879 ----
}
if (!do_section_details)
! {
! if (elf_header.e_machine == EM_X86_64
! || elf_header.e_machine == EM_L1OM)
! printf (_("Key to Flags:\n\
! W (write), A (alloc), X (execute), M (merge), S (strings), l (large)\n\
! I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
! O (extra OS processing required) o (OS specific), p (processor specific)\n"));
! else
! printf (_("Key to Flags:\n\
W (write), A (alloc), X (execute), M (merge), S (strings)\n\
I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown)\n\
O (extra OS processing required) o (OS specific), p (processor specific)\n"));
+ }
return 1;
}