Libelf does not allow the "d_align" field of Elf_Data descriptor
to be set to 0. Workaround this by setting d_align to 1 when
the input object contains sections that have 0 as alignment.

According to ELF ABI, alignment 0 and 1 has the same meaning:
the section has no alignment constraints.

Ticket:	#465

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@3131 95820547-d848-0410-985e-9ae8fe0fa350
Ignore TLS sections during resync. TLS sections' VMA should not
matter and we don't need to adjust or warn about it.

(What matters is the TLS segment's size. TLS is initialized and
accessed via the dynamic linker, when it's not optimized or relaxed)

Ticket:	#465

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@3132 95820547-d848-0410-985e-9ae8fe0fa350
Fix bug in the previous commit. During section resync we can only
ignore TLS sections that are SHT_NOBITS. If TLS section contains
data, its file offset still matters of course.

Ticket:	#465

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@3133 95820547-d848-0410-985e-9ae8fe0fa350
Fix the TLS section check: we should use a separate pointer since the
"s->seg" is only used for PT_LOAD segment.

git-svn-id: svn://svn.code.sf.net/p/elftoolchain/code/trunk@3134 95820547-d848-0410-985e-9ae8fe0fa350
Refactor strtab struct
Add hash table to strtab buffer

This reduces execution time by more than two orders of magnitude on
elfcopy --only-keep-debug --add-gnu-debuglink=clang.debug clang.full clang

x elftc-r3130.txt
+ elftc-hash.txt
+----------------------------------------------------------------------+
|+                                                                     |
|+                                                                     |
|+                                                                     |
|+                                                                     |
|+                                                                   x |
|+                                                                   x |
|+                                                                   x |
|+                                                                   xx|
|+                                                                   xx|
|+                                                                  xxx|
|A                                                                   A||
+----------------------------------------------------------------------+
    N           Min           Max        Median           Avg        Stddev
x  10         17.56         17.96         17.73        17.757    0.14727525
+  10          0.05          0.07          0.07         0.065  0.0070710678
Difference at 95.0% confidence
        -17.692 +/- 0.0979616
        -99.6339% +/- 0.551679%
        (Student's t, pooled s = 0.104259)