Allow self-assignment for absolute symbols defined in a linker script

Modifies ld machinery tracking linker script assignments to notice all
assignments, not just those symbols mentioned in DEFINED().

ld/
	PR ld/14962
	* ldlang.h (struct lang_definedness_hash_entry): Add by_object and
	by_script.  Make iteration a single bit field.
	(lang_track_definedness, lang_symbol_definition_iteration): Delete.
	(lang_symbol_defined): Declare.
	* ldlang.c (lang_statement_iteration): Expand comment a little.
	(lang_init <lang_definedness_table>): Make it bigger.
	(lang_track_definedness, lang_symbol_definition): Delete.
	(lang_definedness_newfunc): Update.
	(lang_symbol_defined): New function.
	(lang_update_definedness): Create entries here.  Do track whether
	script definition of symbol is valid, even when also defined in
	an object file.
	* ldexp.c (fold_name <DEFINED>): Update.
	(fold_name <NAME>): Allow self-assignment for absolute symbols
	defined in a linker script.
ld/testsuite/
	* ld-scripts/pr14962-2.d,
	* ld-scripts/pr14962-2.t: New test.
	* ld-scripts/expr.exp: Run it.
gdb: xtensa: fix linux ptrace includes

Currently, xtensa code using the Linux ptrace interface only include
sys/ptrace.h.  This file comes from the C library (glibc and uClibc,
at least), and includes a declaration of the ptrace() functions, along
with some cross architecture constants that are mostly copied from the
file located at include/uapi/linux/ptrace.h in recent Linux kernels.

For xtensa specific constants like PTRACE_GETXTREGS and
PTRACE_SETXTREGS the asm/ptrace.h include from the Linux kernel UAPI
is needed.  The code in gdbserver xtensa specific part doesn't call
ptrace() directly, so we can remove the unneeded sys/ptrace.h include.
The gdb xtensa specific code needs both headers, since it calls
ptrace().

gdb/
	* xtensa-linux-nat.c: Include asm/ptrace.h.

gdb/gdbserver/
	* linux-xtensa-low.c: Include asm/ptrace.h instead of
	sys/ptrace.h.