This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] Emit DW_EH_PE_indirect constants into linkonce sections if possible


Hi Jakub,

This patch seems to have caused bootstrap troubles on PowerPC. Specifically:

$ /home/bryce/cvs/gcc/build/gcc/xgcc -B/home/bryce/cvs/gcc/
build/gcc/ -nostdinc++ 
-L/home/bryce/cvs/gcc/build/powerpc-unknown-linux-gnu/lib
stdc++-v3/src 
-L/home/bryce/cvs/gcc/build/powerpc-unknown-linux-gnu/libstdc++-v3
/src/.libs -B/home/bryce/gcc31/powerpc-unknown-linux-gnu/bin/ 
-B/home/bryce/gcc3
1/powerpc-unknown-linux-gnu/lib/ -isystem 
/home/bryce/gcc31/powerpc-unknown-linu
x-gnu/include -nostdinc++ 
-I/home/bryce/cvs/gcc/build/powerpc-unknown-linux-gnu/
libstdc++-v3/include/powerpc-unknown-linux-gnu 
-I/home/bryce/cvs/gcc/build/power
pc-unknown-linux-gnu/libstdc++-v3/include 
-I../../../../libstdc++-v3/libsupc++ -
I../../../../libstdc++-v3/libmath -fno-implicit-templates -Wall 
-Wno-format -W -
Wwrite-strings -Winline -fdiagnostics-show-location=once 
-ffunction-sections -fd
ata-sections -g -c ../../../../libstdc++-v3/src/misc-inst.cc  -fPIC 
-DPIC -o .li
bs/misc-inst.o -save-temps
misc-inst.s: Assembler messages:
misc-inst.s:19652: Warning: rest of line ignored; first ignored 
character is `@'
misc-inst.s:19878: Warning: rest of line ignored; first ignored 
character is `@'
[lots more of these...]
misc-inst.s:189963: Warning: rest of line ignored; first ignored 
character is `@'
misc-inst.s:189964: Warning: rest of line ignored; first ignored 
character is `@'
misc-inst.s:189967: Error: unrecognized symbol type "_ZTISt9exception"
misc-inst.s:189967: Warning: rest of line ignored; first ignored 
character is `,'
misc-inst.s:189968: Error: expected comma after name `DW.ref.' in .size 
directive
misc-inst.s:189968: Warning: rest of line ignored; first ignored 
character is `@'
misc-inst.s:189969: Error: Unrecognized opcode: `dw.ref.@_ZTISt9exception:'


All the warnings look like:

    .4byte    DW.ref.@_ZTISt9exception-.

And the final section (with the error) looks like:

DW.ref.__gxx_personality_v0:
.LCP383:
    .long (__gxx_personality_v0)@fixup
    .section    ".fixup","aw"
    .align 2
    .long    .LCP383
    .previous
    .hidden DW.ref.@_ZTISt9exception
    .weak    DW.ref.@_ZTISt9exception
    .section    .gnu.linkonce.s.DW.ref.@_ZTISt9exception,"aw",@progbits
    .align 2
    .type    DW.ref.@_ZTISt9exception,@object
    .size    DW.ref.@_ZTISt9exception,4
DW.ref.@_ZTISt9exception:
.LCP384:
    .long (_ZTISt9exception)@fixup
    .section    ".fixup","aw"
    .align 2
    .long    .LCP384
    .previous
    .ident    "GCC: (GNU) 3.1 20011108 (experimental)"


$ as -v
GNU assembler version 2.11.92.0.10 (powerpc-unknown-linux-gnu) using BFD 
version 2.11.92.0.10 20011021

regards

Bryce.


Jakub Jelinek wrote:

>Hi!
>
>gcc currently emits DW_EH_PE_indirect constants into .data section, like:
>        .data
>        .align 4
>.LC0:
>        .long   __gxx_personality_v0
>This has the drawback that there is one dynamic relocation per object file,
>which can be a lot of relocs while only one is needed.
>This patch changes it on arches which support .hidden assembly directive to:
>        .hidden DW.ref.__gxx_personality_v0
>        .weak   DW.ref.__gxx_personality_v0
>        .section	.gnu.linkonce.d.DW.ref.__gxx_personality_v0,"aw",@progbits
>        .align 4
>        .type   DW.ref.__gxx_personality_v0,@object
>        .size   DW.ref.__gxx_personality_v0,4
>DW.ref.__gxx_personality_v0:
>        .long   __gxx_personality_v0
>so that there is just one dynamic relocation against the same symbol among
>indirect constants. A local symbol (like .LC0) cannot be used, since relocs
>against removed linkonce sections are zeroed-out by the linker (with some
>exceptions) and .hidden ensures that symbol is not exported from the shared
>library or binary.
>







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