This is the mail archive of the binutils@sources.redhat.com 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]

AboutShareLib


Hi, folks:

Here I have some questions about compiler and linker operation, or not.

1. ELF offers flexible shared libraries for us. Then how about COFF? Can we
build shared libraries for COFF and trace COFF library source code during
debugging with GDB?

2. When I link my *.a with my *.o in the case of static linking, will
non-referred functions wrapped in *.a be linked into final a.out(ELF)?

In libfoo.a:
/*function and function1 never call each other*/
function(){}
function1(){}

In my myprog.c (compiled to myprog.o)
main(){
  function();
  return 0;
}

Then after static linking to build myprog.out(final binary), the unuseful
function1() assembly exists in myprog.out or not?

3. In default situation, which level of optimization will get rid of
unuseful assembly if it does exist in myprog.out?

By the way, who can formulate the word 'pointer aligned', which I saw in
'Linux-Kernel-Hacking-HOWTO'.

Best regard,

Kenny Yu


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