Created attachment 5722 [details] patch for add --ignore-lma and --no-ignore-lma for rx-elf-ld AAA ignores LMA and overrides it to VMA for Renesas Tools compatibility. Because of this behavior, generating ROM-file(srec) by objcopy needs extra option --change-section-lma. But --change-section-lma requires immediate value for LMA address, but I want to use symbolized value in linker-script. So, AAA should change its behavior by command-line option "--ignore-lma" and "--no-ignore-lma" (or better name). Attachment for proposal patch.
paste miss... s/AAA/rx-elf-ld/g > rx-elf-ld ignores LMA and overrides it to VMA for Renesas Tools compatibility. > So, rx-elf-ld should change its behavior by command-line option "--ignore-lma" and
CVSROOT: /cvs/src Module name: src Changes by: nickc@sourceware.org 2011-05-17 16:02:31 Modified files: ld : ChangeLog ld/emultempl : rxelf.em bfd : ChangeLog elf32-rx.c Log message: PR ld/12759 * emultempl/rxelf.em (ignore_lma): New variable. (rx_elf_create_output_section_statements): Pass the setiing of ignore_lma to bfd_elf32_rx_set_target_flags. (OPTION_IGNORE_LMA): Define. (OPTION_NO_IGNORE_LMA): Define. (PARSE_AND_LIST_LONGOPTS): Add ignore lma. (PARSE_AND_LIST_OPTIONS): Add ignore lma. (PARSE_AND_LIST_ARGS_CASES): Add ignore lma. * elf32-rx.c (ignore_lma): New variable. (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter. (rx_modify_program_headers): Only copy the LMA into the VMA if ignore_lma is true. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.2335&r2=1.2336 http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/emultempl/rxelf.em.diff?cvsroot=src&r1=1.1&r2=1.2 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/ChangeLog.diff?cvsroot=src&r1=1.5345&r2=1.5346 http://sourceware.org/cgi-bin/cvsweb.cgi/src/bfd/elf32-rx.c.diff?cvsroot=src&r1=1.9&r2=1.10
Hi Tomohiro-san, Thanks for submitting this patch. I have checked it in along with these changelog entries. Cheers Nick bfd/ChangeLog 2011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com> PR ld/12759 * elf32-rx.c (ignore_lma): New variable. (bfd_elf32_rx_set_target_flags): Add ignore_lma parameter. (rx_modify_program_headers): Only copy the LMA into the VMA if ignore_lma is true. ld/ChangeLog 2011-05-17 Tomohiro Kashiwada <kikairoya@gmail.com> PR ld/12759 * emultempl/rxelf.em (ignore_lma): New variable. (rx_elf_create_output_section_statements): Pass the setiing of ignore_lma to bfd_elf32_rx_set_target_flags. (OPTION_IGNORE_LMA): Define. (OPTION_NO_IGNORE_LMA): Define. (PARSE_AND_LIST_LONGOPTS): Add ignore lma. (PARSE_AND_LIST_OPTIONS): Add ignore lma. (PARSE_AND_LIST_ARGS_CASES): Add ignore lma.