This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: -Ttext and phdr_in_segment


Ping

On Thu, Jan 31, 2013 at 09:39:17AM +0100, Joerg Wunsch wrote:
> As Alan Modra wrote:
> 
> > The implementation looks OK, but I believe this patch should be
> > reviewed by the AVR maintainers.  There may be some unforseen effect.
> 
> I reviewed it, and Eric Weddington had a chance to review it, too, but
> did not object.
> 
> Most AVR users extract the binary contents from the ELF file anyway
> (using objcopy), so they won't care.  There are only two direct
> consumers of the ELF file known by now.  One of them (Atmel Studio)
> discovered the problem since they could not properly handle the
> additional header that is placed there when moving the text section
> away from its default address 0, and the other one (Opensource
> AVRDUDE) has been verified to handle both cases well, without as well
> as with the change applied.
> -- 
> Joerg Wunsch * Development engineer, Dresden, Germany
> 
> Atmel Automotive GmbH, Theresienstrasse 2, D-74027 Heilbronn
> Geschaeftsfuehrung: Steven A. Laub, Stephen Cumming
> Amtsgericht Stuttgart, Registration HRB 106594

2013-01-25  Senthil Kumar Selvaraj  <senthil_kumar.selvaraj@atmel.com>

        * ld/emultempl/avrelf.em: Add avr_elf_before_parse and disable
        demand paging


diff --git ld/emultempl/avrelf.em ld/emultempl/avrelf.em
index e0d6357..7f7dcf0 100644
--- ld/emultempl/avrelf.em
+++ ld/emultempl/avrelf.em
@@ -166,6 +166,15 @@ avr_elf_after_allocation (void)
     }
 }
 
+static void
+avr_elf_before_parse (void)
+{
+  /* Don't create a demand-paged executable, since this feature isn't
+     meaningful in AVR. */
+  config.magic_demand_paged = FALSE;
+
+  gld${EMULATION_NAME}_before_parse ();
+}
 
 EOF
 
@@ -262,6 +271,7 @@ PARSE_AND_LIST_ARGS_CASES='
 #
 # Put these extra avr-elf routines in ld_${EMULATION_NAME}_emulation
 #
+LDEMUL_BEFORE_PARSE=avr_elf_before_parse
 LDEMUL_BEFORE_ALLOCATION=avr_elf_${EMULATION_NAME}_before_allocation
 LDEMUL_AFTER_ALLOCATION=avr_elf_after_allocation
 LDEMUL_CREATE_OUTPUT_SECTION_STATEMENTS=avr_elf_create_output_section_statements


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]