pcrelcp-1.d 1.4 KB

123456789101112131415161718192021222324252627282930313233
  1. #as: --no-underscore --em=criself
  2. #ld: -shared -m crislinux -z nocombreloc
  3. #ld_after_inputfiles: tmpdir/libdso-1b.so
  4. #warning: \A[^\n]*\.o, section `.text', to symbol `expfn@@TST2':[^\n]*recompile with -fPIC\Z
  5. #readelf: -a
  6. # Building a DSO with (unrecommended) non-pic pc-relative references
  7. # to a versioned symbol in a library got caught by an assert in
  8. # elf_cris_copy_indirect_symbol wherein the list of pc-relative
  9. # references wasn't merged, but simply asserted to be NULL before
  10. # copied to, on the merged-to (direct) symbol. For versioned symbols,
  11. # there was an "extra" copy made, to make a base-version symbol, where
  12. # the copied-from pc-relative list was NULL but the copied-to symbol
  13. # already had a list merged.
  14. # The list was used to emit warning messages, but incorrectly held the
  15. # relocation section for the reference, resulting in warnings being
  16. # emitted for any section with a pc-relative relocation.
  17. # The test checks that there's a warning message only for the
  18. # read-only sections section (.text) (not the read-write sections),
  19. # that the correct number of relocations is emitted and we also check
  20. # for the TEXTREL dynamic marker.
  21. #...
  22. 0x00000016 \(TEXTREL\)[ ]+0x0
  23. #...
  24. Relocation section '\.rela\.text' at offset .* contains 4 entries:
  25. #...
  26. Relocation section '\.rela\.data' at offset .* contains 8 entries:
  27. #...
  28. Relocation section '.rela.data2' at offset .* contains 16 entries:
  29. #pass