* Re: arm-eabi-4.4.3 with gold [not found] <AANLkTikQk6Va7VJ2CRyp6rZRB_aJ22FHq69jKi+tAFk6@mail.gmail.com> @ 2011-02-08 23:03 ` Doug Kwan (關振德) [not found] ` <AANLkTikSgmGBUba_gX7GH8DQZFwfz1tDpyq9HbNYd9kJ@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Doug Kwan (關振德) @ 2011-02-08 23:03 UTC (permalink / raw) To: Qing Chang; +Cc: binutils, Jing Yu, Ying Wang KEEP is totally broken. What section do you need? You can fall back on ld by adding -fuse-ld=bfd in gcc's linking step. On Tue, Feb 8, 2011 at 2:58 PM, Qing Chang <changq@gmail.com> wrote: > Dear all, > In the latest arm-eabi-4.4.3 toolchain of Android repo, gold was > installed/used as default arm-eabi-ld, instead of bfd ld. > > However, compared with arm-eabi-4.4.0, with this new 4.4.3 gold, seems some > key words are not handled in the same way as before. For example, > * PROVIDE/PROVIDE_HIDDEN won't define symbol any more > * KEEP won't keep sections during garbage collections any more > > Do we need certain extra option/flag to re-enable these when using > 4.4.3 arm-eabi-ld (gold)? > Thanks, > Qing ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <AANLkTikSgmGBUba_gX7GH8DQZFwfz1tDpyq9HbNYd9kJ@mail.gmail.com>]
* Re: arm-eabi-4.4.3 with gold [not found] ` <AANLkTikSgmGBUba_gX7GH8DQZFwfz1tDpyq9HbNYd9kJ@mail.gmail.com> @ 2011-02-09 3:55 ` Doug Kwan (關振德) [not found] ` <AANLkTikY7GFtATbGHjjLhB8j1hKohnUHQw41xmrAatof@mail.gmail.com> 0 siblings, 1 reply; 3+ messages in thread From: Doug Kwan (關振德) @ 2011-02-09 3:55 UTC (permalink / raw) To: Qing Chang; +Cc: binutils, Jing Yu, Ying Wang why -fuse-ld=bfd does not work? Do you invoke the linker directly? Could you give me an example in which PROVIDE_HIDDEN not long works with the new tool-chain but does with the old one? Thanks -Doug On Tue, Feb 8, 2011 at 7:48 PM, Qing Chang <changq@gmail.com> wrote: > > The section was created by myself. > Seems "-fuse-ld=bfd" won't make PROVIDE_HIDDEN nor KEEP work as well. > The only working way for me is to hardcode in my makefile to > use arm-eabi-ld.bfd explicitly > > On Tue, Feb 8, 2011 at 5:03 PM, Doug Kwan (關振德) <dougkwan@google.com> wrote: >> >> KEEP is totally broken. What section do you need? You can fall back >> on ld by adding -fuse-ld=bfd in gcc's linking step. >> >> On Tue, Feb 8, 2011 at 2:58 PM, Qing Chang <changq@gmail.com> wrote: >> > Dear all, >> > In the latest arm-eabi-4.4.3 toolchain of Android repo, gold was >> > installed/used as default arm-eabi-ld, instead of bfd ld. >> > >> > However, compared with arm-eabi-4.4.0, with this new 4.4.3 gold, seems >> > some >> > key words are not handled in the same way as before. For example, >> > * PROVIDE/PROVIDE_HIDDEN won't define symbol any more >> > * KEEP won't keep sections during garbage collections any more >> > >> > Do we need certain extra option/flag to re-enable these when using >> > 4.4.3 arm-eabi-ld (gold)? >> > Thanks, >> > Qing > > ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <AANLkTikY7GFtATbGHjjLhB8j1hKohnUHQw41xmrAatof@mail.gmail.com>]
* Re: arm-eabi-4.4.3 with gold [not found] ` <AANLkTikY7GFtATbGHjjLhB8j1hKohnUHQw41xmrAatof@mail.gmail.com> @ 2011-02-09 4:10 ` Doug Kwan (關振德) 0 siblings, 0 replies; 3+ messages in thread From: Doug Kwan (關振德) @ 2011-02-09 4:10 UTC (permalink / raw) To: Qing Chang; +Cc: binutils, Jing Yu, Ying Wang This will break. The .commands and .apps sections will not be preserved. It is a known problem. Unfortunately, this is a design issue in the garbage collector in gold and it cannot be fixed easily. You have no choice but to use GNU ld. Adding -fuse-ld=bfd is not useful in your case as it seems that the linker is invoked directly. On Tue, Feb 8, 2011 at 8:03 PM, Qing Chang <changq@gmail.com> wrote: > Here is what I did to use "-fuse-ld=bfd", > ==================== > diff --git a/makefile b/makefile > index 699fcfe..1ea652e 100644 > --- a/makefile > +++ b/makefile > @@ -52,7 +52,7 @@ CPPFLAGS := -fno-exceptions -fno-rtti > -fno-threadsafe-statics > ASMFLAGS := -DASSEMBLY > LDFLAGS := > > -CFLAGS += -ffunction-sections -fdata-sections > +CFLAGS += -ffunction-sections -fdata-sections -fuse-ld=bfd > LDFLAGS += -gc-sections --no-enum-size-warning > > # top level rule > ==================== > Here is the piece of link script of PROVIDE_HIDDEN and KEEP usage, > ==================== > .rodata : { > *(.rodata .rodata.* .gnu.linkonce.r.*) > . = ALIGN(4); > __commands_start = .; > KEEP (*(.commands)) > __commands_end = .; > . = ALIGN(4); > __apps_start = .; > KEEP (*(.apps)) > __apps_end = .; > . = ALIGN(4); > __rodata_end = . ; > } > .ARM.extab : { *(.ARM.extab* .gnu.linkonce.armextab.*) } > PROVIDE_HIDDEN (__exidx_start = .); > .ARM.exidx : { *(.ARM.exidx* .gnu.linkonce.armexidx.*) } > PROVIDE_HIDDEN (__exidx_end = .); > ==================== > On Tue, Feb 8, 2011 at 9:55 PM, Doug Kwan (關振德) <dougkwan@google.com> wrote: >> >> why -fuse-ld=bfd does not work? Do you invoke the linker directly? >> >> Could you give me an example in which PROVIDE_HIDDEN not long works >> with the new tool-chain but does with the old one? >> >> Thanks >> >> -Doug >> >> On Tue, Feb 8, 2011 at 7:48 PM, Qing Chang <changq@gmail.com> wrote: >> > >> > The section was created by myself. >> > Seems "-fuse-ld=bfd" won't make PROVIDE_HIDDEN nor KEEP work as well. >> > The only working way for me is to hardcode in my makefile to >> > use arm-eabi-ld.bfd explicitly >> > >> > On Tue, Feb 8, 2011 at 5:03 PM, Doug Kwan (關振德) <dougkwan@google.com> >> > wrote: >> >> >> >> KEEP is totally broken. What section do you need? You can fall back >> >> on ld by adding -fuse-ld=bfd in gcc's linking step. >> >> >> >> On Tue, Feb 8, 2011 at 2:58 PM, Qing Chang <changq@gmail.com> wrote: >> >> > Dear all, >> >> > In the latest arm-eabi-4.4.3 toolchain of Android repo, gold was >> >> > installed/used as default arm-eabi-ld, instead of bfd ld. >> >> > >> >> > However, compared with arm-eabi-4.4.0, with this new 4.4.3 gold, >> >> > seems >> >> > some >> >> > key words are not handled in the same way as before. For example, >> >> > * PROVIDE/PROVIDE_HIDDEN won't define symbol any more >> >> > * KEEP won't keep sections during garbage collections any more >> >> > >> >> > Do we need certain extra option/flag to re-enable these when using >> >> > 4.4.3 arm-eabi-ld (gold)? >> >> > Thanks, >> >> > Qing >> > >> > > > ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-09 4:10 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <AANLkTikQk6Va7VJ2CRyp6rZRB_aJ22FHq69jKi+tAFk6@mail.gmail.com> 2011-02-08 23:03 ` arm-eabi-4.4.3 with gold Doug Kwan (關振德) [not found] ` <AANLkTikSgmGBUba_gX7GH8DQZFwfz1tDpyq9HbNYd9kJ@mail.gmail.com> 2011-02-09 3:55 ` Doug Kwan (關振德) [not found] ` <AANLkTikY7GFtATbGHjjLhB8j1hKohnUHQw41xmrAatof@mail.gmail.com> 2011-02-09 4:10 ` Doug Kwan (關振德)
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).