diff options
author | Andreas Arnez <arnez@linux.vnet.ibm.com> | 2014-01-22 15:33:00 +0000 |
---|---|---|
committer | Andreas Krebbel <krebbel@linux.vnet.ibm.com> | 2014-01-22 17:02:13 +0100 |
commit | 20fa339009918ded4110124744bf97c12d3d77f5 (patch) | |
tree | 939a38cba8b723b1d909d309f18a52c3dbe9f697 /gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c | |
parent | 784667142320ce3cbd8c4542c147451e43fb30d4 (diff) | |
download | gdb-20fa339009918ded4110124744bf97c12d3d77f5.zip gdb-20fa339009918ded4110124744bf97c12d3d77f5.tar.gz gdb-20fa339009918ded4110124744bf97c12d3d77f5.tar.bz2 |
Re-introduce '_start' labels and add alignment in dw2-dir-file-name test case.
On ppc64-linux a function symbol does not point to code, but to the
function descriptor. Thus the previous change for this test case
broke it:
https://sourceware.org/ml/gdb-patches/2014-01/msg00275.html
This patch reverts to the original method, re-introducing '_start'
symbols. In addition, it adds sufficient alignment before the label,
such that the label never points into an alignment gap.
gdb/testsuite/ChangeLog:
* gdb.dwarf2/dw2-dir-file-name.c (FUNC): Insert alignment and
define "*_start" label. Make "name" static.
* gdb.dwarf2/dw2-dir-file-name.exp: Replace references to
${name} by references to ${name}_start.
Diffstat (limited to 'gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c')
-rw-r--r-- | gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c index 2b9cc6a..517df90 100644 --- a/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c +++ b/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.c @@ -63,8 +63,16 @@ FUNC (compdir_absolute_ldir_absolute_file_relative_different) \ FUNC (compdir_absolute_ldir_absolute_file_absolute_same) \ FUNC (compdir_absolute_ldir_absolute_file_absolute_different) +/* Notes: (1) The '*_start' label below is needed because 'name' may + point to a function descriptor instead of to the actual code. (2) + The '.balign' should specify the highest possible function + alignment across all supported architectures, such that the label + never points into the alignment gap. */ + #define FUNC(name) \ - void \ + asm (".balign 8"); \ + asm (#name "_start: .globl " #name "_start\n"); \ + static void \ name (void) \ { \ v++; \ |