Jan-Jaap van der Geer wrote:
Lee Noar <[email protected]> wrote:

Do you not see this in the archive you have built? PIC code is
easy to  spot as it has an instruction pattern as follows at the
beginning of the  function:

  ADD   r7,pc,r7
  LDMIA r8,{r7,r8}
  LDR   r8,[r8,#0]
  LDR   r7,[r8,r7,LSL#4]

Perhaps this is deliberate by the developers to make the build
easier (I don't know if it actually does) or maybe an oversight
that hasn't shown up on other platforms.

Can anyone else confirm if they are seeing PIC code in the
libglib static archive. Actually, assuming you're using a code
viewer (like Zap) in RISC OS, it's probably easier to build Vala
and search the binary - objects stored in archives aren't always
word aligned and don't disassemble correctly.

I found 16 instances of this code within the Vala binary.

Not at all sure what this all means,

It's not our compiler or build system that's at fault. It's a problem or possibly "feature" of the libglib build system and occurs on a native Linux build also. When building a relatively large or complex shared library, it's common for sub components to be kept in sub directories and built into intermediate archives for linking into the main library later on. These are called convenience libraries and they contain PIC code even though they are archive libraries because they are destined to be part of a shared library. Unfortunately, the final static archive library (used when statically linking programs) is also built from these convenience libraries, so statically linked programs end up containing PIC code.

is there anything I could do
to resolve this issue? Would building a shared library version of
Vala be a solution? Or does doesn't it have anything to do with
that?

Actually, a dynamically linked (shared library) version should work better.

Lee.

_______________________________________________
GCCSDK mailing list [email protected]
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

Reply via email to