This is the mail archive of the binutils@sourceware.org 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]
Other format: [Raw text]

Re: Multigot mechanism and a related MIPS linker error


Hi Shankar,

For our MIPS cross-compiler,
gcc version is  4.2.0
binutils version is 2.17.90.

I assume that you know that 2.17.90 is an old binutils release ? We are currently on release 2.19 and 2.20 will be out shortly.



I am not a MIPS expert, so I am not going to try to answer your questions about the multigot feature, but I can answer this question:


d) I want to understand the ld test-suite
(/toolchain/testsuite/binutils/testsuite/ld/ld-mips-elf)  Is there any
writeup  somewhere ?

There is no writeup. (Maybe someone would like to create one ?) In essence though the linker tests are meant to be self-documenting.


What happens is that in each sub-directory of the testsuite there are one or more "expect" files. These are files that have the .exp extension. They are written in a scripting language called expect. (http://en.wikipedia.org/wiki/Expect). These files decide which tests should be run based on the target being tested, and occasionally they contain extra code to help with the testing. Some helper code can also be found in the ld/testsuite/lib/ld-lib.exp file.

Most individual linker tests consist of one or more assembler or C source files (with .s or .c extensions) and also an expected output file (with a .d extension). The .d file actually drives the test. At the start of the file are various directives which specify things like the name of the test, the source files that must be assembled or compiled first, the command line options to pass to the linker, the program used to examine the output of the linker and so on.

Ideally each test will check just one particular feature of the linker, or make sure that one particular bug is no longer present in the linker. Also the tests should be separated into sub-directories based on the target that they are for or the general area of the linker that they are testing. Hence the ld-mips-elf sub-directory contains tests for MIPS linkers that use the ELF file format.

The testsuite itself is run using another tool called DejaGnu (http://en.wikipedia.org/wiki/Dejagnu). Apart from setting up a site.exp file and DEJAGNU environment variable before using dejagnu for the first time, most testers will not need to deeply into the internals of DejaGnu.

I hope that this explanation helps.

Cheers
  Nick


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