Compare commits

...

69 Commits

Author SHA1 Message Date
GDB Administrator
07d117342c Automatic date update in version.in 2019-02-27 00:01:27 +00:00
Nick Clifton
6d33d99616 Import patch to fix PR23919 from the mainline.
PR binutils/23919
bfd	* bfd.c (bfd_update_compression_header): Explicitly set alignment.
	(bfd_check_compression_header): Add uncompressed_alignment_power
	argument. Check ch_addralign is a power of 2.
	* bfd-in2.h: Regenerated.
	* compress.c (bfd_compress_section_contents): Get and set
	orig_uncompressed_alignment_pow if section is decompressed.
	(bfd_is_section_compressed_with_header): Add and get
	uncompressed_align_pow_p argument.
	(bfd_is_section_compressed): Add uncompressed_align_power argument
	to bfd_is_section_compressed_with_header call.
	(bfd_init_section_decompress_status): Get and set
	uncompressed_alignment_power.
	* elf.c (_bfd_elf_make_section_from_shdr): Add
	uncompressed_align_power argument to
	bfd_is_section_compressed_with_header call.

	* compress.c (bfd_is_section_compressed_with_header): Initialize
	* uncompressed_align_pow_p to 0.

binutils* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
	(dump_sections_as_bytes): Likewise.
	(load_specific_debug_sections): Likewise.
	* testsuite/binutils-all/dw2-3.rS: Adjust alignment.
	* testsuite/binutils-all/dw2-3.rt: Likewise.

gold	* merge.cc (Output_merge_string<Char_type>::do_add_input_section):
	Get addralign from decompressed_section_contents.
	* object.cc (build_compressed_section_map): Set info.addralign.
	(Object::decompressed_section_contents): Add a palign
	argument and store p->second.addralign in *palign if it isn't
	NULL.
	* object.h (Compressed_section_info): Add addralign.
	(section_is_compressed): Add a palign argument, default it
	to NULL, store p->second.addralign in *palign if it isn't NULL.
	(Object::decompressed_section_contents): Likewise.
	* output.cc (Output_section::add_input_section): Get addralign
	from section_is_compressed.
2019-02-26 19:57:46 +00:00
GDB Administrator
8c5071ec8f Automatic date update in version.in 2019-02-26 00:01:25 +00:00
GDB Administrator
55598c71a0 Automatic date update in version.in 2019-02-25 00:01:21 +00:00
GDB Administrator
575b3d2ad8 Automatic date update in version.in 2019-02-24 00:02:10 +00:00
GDB Administrator
07bc76dcd3 Automatic date update in version.in 2019-02-23 00:01:29 +00:00
GDB Administrator
012f4e6b46 Automatic date update in version.in 2019-02-22 00:01:20 +00:00
GDB Administrator
d0036795a7 Automatic date update in version.in 2019-02-21 00:01:30 +00:00
GDB Administrator
521dcd25a8 Automatic date update in version.in 2019-02-20 00:01:38 +00:00
GDB Administrator
4f6e3f3ddb Automatic date update in version.in 2019-02-19 00:01:46 +00:00
GDB Administrator
f06c0401c6 Automatic date update in version.in 2019-02-18 00:01:46 +00:00
GDB Administrator
f084815140 Automatic date update in version.in 2019-02-17 00:02:14 +00:00
GDB Administrator
03ec2a9d6d Automatic date update in version.in 2019-02-16 00:01:45 +00:00
GDB Administrator
baf722e986 Automatic date update in version.in 2019-02-15 00:02:00 +00:00
GDB Administrator
7e901d5f1d Automatic date update in version.in 2019-02-14 00:02:07 +00:00
GDB Administrator
fcd897bea8 Automatic date update in version.in 2019-02-13 00:01:05 +00:00
GDB Administrator
b15aaa4c85 Automatic date update in version.in 2019-02-12 00:00:50 +00:00
GDB Administrator
f056fa6b5a Automatic date update in version.in 2019-02-11 00:00:50 +00:00
GDB Administrator
ffe002afba Automatic date update in version.in 2019-02-10 00:02:08 +00:00
GDB Administrator
cf1228d614 Automatic date update in version.in 2019-02-09 00:01:51 +00:00
GDB Administrator
370128db63 Automatic date update in version.in 2019-02-08 00:01:14 +00:00
GDB Administrator
e570d770b4 Automatic date update in version.in 2019-02-07 00:01:51 +00:00
GDB Administrator
eadead4859 Automatic date update in version.in 2019-02-06 00:00:59 +00:00
GDB Administrator
ec64583896 Automatic date update in version.in 2019-02-05 00:01:24 +00:00
GDB Administrator
3f0dfe6621 Automatic date update in version.in 2019-02-04 00:01:44 +00:00
GDB Administrator
95f4e75fb4 Automatic date update in version.in 2019-02-03 00:01:35 +00:00
GDB Administrator
8c55a71370 Automatic date update in version.in 2019-02-02 00:00:58 +00:00
GDB Administrator
ad3847a8c9 Automatic date update in version.in 2019-02-01 00:00:56 +00:00
GDB Administrator
50d0fe730f Automatic date update in version.in 2019-01-31 00:00:58 +00:00
GDB Administrator
eb26cbd330 Automatic date update in version.in 2019-01-30 00:01:34 +00:00
GDB Administrator
78ffec2d29 Automatic date update in version.in 2019-01-29 00:01:53 +00:00
GDB Administrator
815e64557e Automatic date update in version.in 2019-01-28 00:00:59 +00:00
GDB Administrator
abe44b7078 Automatic date update in version.in 2019-01-27 00:02:13 +00:00
GDB Administrator
cea79716d3 Automatic date update in version.in 2019-01-26 00:01:55 +00:00
GDB Administrator
30db4d467b Automatic date update in version.in 2019-01-25 00:01:43 +00:00
GDB Administrator
6077bc3151 Automatic date update in version.in 2019-01-24 00:01:33 +00:00
GDB Administrator
64d97f7abd Automatic date update in version.in 2019-01-23 00:01:32 +00:00
GDB Administrator
5ed1741ab5 Automatic date update in version.in 2019-01-22 00:01:24 +00:00
GDB Administrator
e0c8c080d1 Automatic date update in version.in 2019-01-21 00:01:31 +00:00
GDB Administrator
abb68c0f2b Automatic date update in version.in 2019-01-20 00:02:11 +00:00
GDB Administrator
b6de122f9e Automatic date update in version.in 2019-01-19 00:01:35 +00:00
GDB Administrator
7438306a46 Automatic date update in version.in 2019-01-18 00:01:41 +00:00
GDB Administrator
88beb8b787 Automatic date update in version.in 2019-01-17 00:01:43 +00:00
GDB Administrator
8b8ad66915 Automatic date update in version.in 2019-01-16 00:01:18 +00:00
GDB Administrator
6dced3e5b3 Automatic date update in version.in 2019-01-15 00:00:56 +00:00
GDB Administrator
30dbb69cf1 Automatic date update in version.in 2019-01-14 00:00:54 +00:00
GDB Administrator
befabc5cbe Automatic date update in version.in 2019-01-13 00:02:40 +00:00
GDB Administrator
dc359e9889 Automatic date update in version.in 2019-01-12 00:01:00 +00:00
GDB Administrator
737f223693 Automatic date update in version.in 2019-01-11 00:00:47 +00:00
GDB Administrator
b050e789f1 Automatic date update in version.in 2019-01-10 00:01:42 +00:00
GDB Administrator
a024badc07 Automatic date update in version.in 2019-01-09 00:01:25 +00:00
GDB Administrator
b9f0f61835 Automatic date update in version.in 2019-01-08 00:01:52 +00:00
GDB Administrator
6b9a24bad6 Automatic date update in version.in 2019-01-07 00:01:36 +00:00
GDB Administrator
f9174ab830 Automatic date update in version.in 2019-01-06 00:02:05 +00:00
GDB Administrator
d9b0cff96b Automatic date update in version.in 2019-01-05 00:01:12 +00:00
GDB Administrator
e5381fba7f Automatic date update in version.in 2019-01-04 00:01:16 +00:00
GDB Administrator
230173792f Automatic date update in version.in 2019-01-03 00:01:34 +00:00
GDB Administrator
b524049bdc Automatic date update in version.in 2019-01-02 00:00:47 +00:00
GDB Administrator
da2a258541 Automatic date update in version.in 2019-01-01 00:01:10 +00:00
GDB Administrator
96298468cf Automatic date update in version.in 2018-12-31 00:00:53 +00:00
GDB Administrator
5adc2cd81b Automatic date update in version.in 2018-12-30 00:01:39 +00:00
GDB Administrator
a9443d2d0a Automatic date update in version.in 2018-12-29 00:01:44 +00:00
GDB Administrator
7f79e8d9f5 Automatic date update in version.in 2018-12-28 00:01:01 +00:00
GDB Administrator
bde9d51d13 Automatic date update in version.in 2018-12-27 00:01:32 +00:00
GDB Administrator
27bedadec2 Automatic date update in version.in 2018-12-26 00:01:36 +00:00
GDB Administrator
3adca7997e Automatic date update in version.in 2018-12-25 00:01:37 +00:00
GDB Administrator
d96be470a3 Automatic date update in version.in 2018-12-24 00:01:00 +00:00
Joel Brobecker
ca0560bb34 Bump GDB version number to 8.2.1.DATE-git.
gdb/ChangeLog:

	* version.in: Set GDB version number to 8.2.1.DATE-git.
	* PROBLEMS: Likewise.
2018-12-23 10:07:51 +04:00
Joel Brobecker
792af5f015 Document the GDB 8.2.1 release in gdb/ChangeLog
gdb/ChangeLog:

	GDB 8.2.1 released.
2018-12-23 10:02:13 +04:00
18 changed files with 150 additions and 53 deletions

View File

@@ -1,3 +1,31 @@
2019-02-18 Nick Clifton <nickc@redhat.com>
Import from the mainline:
2018-11-27 Mark Wielaard <mark@klomp.org>
PR binutils/23919
* bfd.c (bfd_update_compression_header): Explicitly set alignment.
(bfd_check_compression_header): Add uncompressed_alignment_power
argument. Check ch_addralign is a power of 2.
* bfd-in2.h: Regenerated.
* compress.c (bfd_compress_section_contents): Get and set
orig_uncompressed_alignment_pow if section is decompressed.
(bfd_is_section_compressed_with_header): Add and get
uncompressed_align_pow_p argument.
(bfd_is_section_compressed): Add uncompressed_align_power argument
to bfd_is_section_compressed_with_header call.
(bfd_init_section_decompress_status): Get and set
uncompressed_alignment_power.
* elf.c (_bfd_elf_make_section_from_shdr): Add
uncompressed_align_power argument to
bfd_is_section_compressed_with_header call.
2018-11-27 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/23919
* compress.c (bfd_is_section_compressed_with_header): Initialize
* uncompressed_align_pow_p to 0.
2018-07-04 Joel Brobecker <brobecker@adacore.com>
* development.sh (development): Set to false.

View File

@@ -7292,7 +7292,8 @@ void bfd_update_compression_header
bfd_boolean bfd_check_compression_header
(bfd *abfd, bfd_byte *contents, asection *sec,
bfd_size_type *uncompressed_size);
bfd_size_type *uncompressed_size,
unsigned int *uncompressed_alignment_power);
int bfd_get_compression_header_size (bfd *abfd, asection *sec);
@@ -7868,7 +7869,8 @@ void bfd_cache_section_contents
bfd_boolean bfd_is_section_compressed_with_header
(bfd *abfd, asection *section,
int *compression_header_size_p,
bfd_size_type *uncompressed_size_p);
bfd_size_type *uncompressed_size_p,
unsigned int *uncompressed_alignment_power_p);
bfd_boolean bfd_is_section_compressed
(bfd *abfd, asection *section);

View File

@@ -2332,6 +2332,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
bfd_put_32 (abfd, sec->size, &echdr->ch_size);
bfd_put_32 (abfd, 1 << sec->alignment_power,
&echdr->ch_addralign);
/* bfd_log2 (alignof (Elf32_Chdr)). */
bfd_set_section_alignment (abfd, sec, 2);
}
else
{
@@ -2342,6 +2344,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
bfd_put_64 (abfd, sec->size, &echdr->ch_size);
bfd_put_64 (abfd, 1 << sec->alignment_power,
&echdr->ch_addralign);
/* bfd_log2 (alignof (Elf64_Chdr)). */
bfd_set_section_alignment (abfd, sec, 3);
}
}
else
@@ -2354,6 +2358,8 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
order. */
memcpy (contents, "ZLIB", 4);
bfd_putb64 (sec->size, contents + 4);
/* No way to keep the original alignment, just use 1 always. */
bfd_set_section_alignment (abfd, sec, 0);
}
}
}
@@ -2368,12 +2374,15 @@ bfd_update_compression_header (bfd *abfd, bfd_byte *contents,
SYNOPSIS
bfd_boolean bfd_check_compression_header
(bfd *abfd, bfd_byte *contents, asection *sec,
bfd_size_type *uncompressed_size);
bfd_size_type *uncompressed_size,
unsigned int *uncompressed_alignment_power);
DESCRIPTION
Check the compression header at CONTENTS of SEC in ABFD and
store the uncompressed size in UNCOMPRESSED_SIZE if the
compression header is valid.
store the uncompressed size in UNCOMPRESSED_SIZE and the
uncompressed data alignment in UNCOMPRESSED_ALIGNMENT_POWER
if the compression header is valid.
RETURNS
Return TRUE if the compression header is valid.
@@ -2382,7 +2391,8 @@ RETURNS
bfd_boolean
bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
asection *sec,
bfd_size_type *uncompressed_size)
bfd_size_type *uncompressed_size,
unsigned int *uncompressed_alignment_power)
{
if (bfd_get_flavour (abfd) == bfd_target_elf_flavour
&& (elf_section_flags (sec) & SHF_COMPRESSED) != 0)
@@ -2404,9 +2414,10 @@ bfd_check_compression_header (bfd *abfd, bfd_byte *contents,
chdr.ch_addralign = bfd_get_64 (abfd, &echdr->ch_addralign);
}
if (chdr.ch_type == ELFCOMPRESS_ZLIB
&& chdr.ch_addralign == 1U << sec->alignment_power)
&& chdr.ch_addralign == (1U << bfd_log2 (chdr.ch_addralign)))
{
*uncompressed_size = chdr.ch_size;
*uncompressed_alignment_power = bfd_log2 (chdr.ch_addralign);
return TRUE;
}
}

View File

@@ -84,11 +84,13 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
int zlib_size = 0;
int orig_compression_header_size;
bfd_size_type orig_uncompressed_size;
unsigned int orig_uncompressed_alignment_pow;
int header_size = bfd_get_compression_header_size (abfd, NULL);
bfd_boolean compressed
= bfd_is_section_compressed_with_header (abfd, sec,
&orig_compression_header_size,
&orig_uncompressed_size);
&orig_uncompressed_size,
&orig_uncompressed_alignment_pow);
/* Either ELF compression header or the 12-byte, "ZLIB" + 8-byte size,
overhead in .zdebug* section. */
@@ -153,6 +155,8 @@ bfd_compress_section_contents (bfd *abfd, sec_ptr sec,
return 0;
}
free (uncompressed_buffer);
bfd_set_section_alignment (abfd, sec,
orig_uncompressed_alignment_pow);
sec->contents = buffer;
sec->compress_status = COMPRESS_SECTION_DONE;
return orig_uncompressed_size;
@@ -364,20 +368,25 @@ SYNOPSIS
bfd_boolean bfd_is_section_compressed_with_header
(bfd *abfd, asection *section,
int *compression_header_size_p,
bfd_size_type *uncompressed_size_p);
bfd_size_type *uncompressed_size_p,
unsigned int *uncompressed_alignment_power_p);
DESCRIPTION
Return @code{TRUE} if @var{section} is compressed. Compression
header size is returned in @var{compression_header_size_p} and
uncompressed size is returned in @var{uncompressed_size_p}. If
compression is unsupported, compression header size is returned
with -1 and uncompressed size is returned with 0.
header size is returned in @var{compression_header_size_p},
uncompressed size is returned in @var{uncompressed_size_p}
and the uncompressed data alignement power is returned in
@var{uncompressed_align_pow_p}. If compression is
unsupported, compression header size is returned with -1
and uncompressed size is returned with 0.
*/
bfd_boolean
bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
int *compression_header_size_p,
bfd_size_type *uncompressed_size_p)
bfd_size_type *uncompressed_size_p,
unsigned int *uncompressed_align_pow_p)
{
bfd_byte header[MAX_COMPRESSION_HEADER_SIZE];
int compression_header_size;
@@ -385,6 +394,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
unsigned int saved = sec->compress_status;
bfd_boolean compressed;
*uncompressed_align_pow_p = 0;
compression_header_size = bfd_get_compression_header_size (abfd, sec);
if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
abort ();
@@ -412,7 +423,8 @@ bfd_is_section_compressed_with_header (bfd *abfd, sec_ptr sec,
if (compression_header_size != 0)
{
if (!bfd_check_compression_header (abfd, header, sec,
uncompressed_size_p))
uncompressed_size_p,
uncompressed_align_pow_p))
compression_header_size = -1;
}
/* Check for the pathalogical case of a debug string section that
@@ -449,9 +461,11 @@ bfd_is_section_compressed (bfd *abfd, sec_ptr sec)
{
int compression_header_size;
bfd_size_type uncompressed_size;
unsigned int uncompressed_align_power;
return (bfd_is_section_compressed_with_header (abfd, sec,
&compression_header_size,
&uncompressed_size)
&uncompressed_size,
&uncompressed_align_power)
&& compression_header_size >= 0
&& uncompressed_size > 0);
}
@@ -480,6 +494,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
int compression_header_size;
int header_size;
bfd_size_type uncompressed_size;
unsigned int uncompressed_alignment_power = 0;
compression_header_size = bfd_get_compression_header_size (abfd, sec);
if (compression_header_size > MAX_COMPRESSION_HEADER_SIZE)
@@ -508,7 +523,8 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
uncompressed_size = bfd_getb64 (header + 4);
}
else if (!bfd_check_compression_header (abfd, header, sec,
&uncompressed_size))
&uncompressed_size,
&uncompressed_alignment_power))
{
bfd_set_error (bfd_error_wrong_format);
return FALSE;
@@ -516,6 +532,7 @@ bfd_init_section_decompress_status (bfd *abfd, sec_ptr sec)
sec->compressed_size = sec->size;
sec->size = uncompressed_size;
bfd_set_section_alignment (abfd, sec, uncompressed_alignment_power);
sec->compress_status = DECOMPRESS_SECTION_SIZED;
return TRUE;

View File

@@ -1177,10 +1177,12 @@ _bfd_elf_make_section_from_shdr (bfd *abfd,
enum { nothing, compress, decompress } action = nothing;
int compression_header_size;
bfd_size_type uncompressed_size;
unsigned int uncompressed_align_power;
bfd_boolean compressed
= bfd_is_section_compressed_with_header (abfd, newsect,
&compression_header_size,
&uncompressed_size);
&uncompressed_size,
&uncompressed_align_power);
if (compressed)
{

View File

@@ -16,7 +16,7 @@
In releases, the date is not included in either version strings or
sonames. */
#define BFD_VERSION_DATE 20181223
#define BFD_VERSION_DATE 20190227
#define BFD_VERSION @bfd_version@
#define BFD_VERSION_STRING @bfd_version_package@ @bfd_version_string@
#define REPORT_BUGS_TO @report_bugs_to@

View File

@@ -1,3 +1,15 @@
2019-02-18 Nick Clifton <nickc@redhat.com>
Import from the mainline:
2018-11-27 Mark Wielaard <mark@klomp.org>
PR binutils/23919
* readelf.c (dump_sections_as_strings): Remove bogus addralign check.
(dump_sections_as_bytes): Likewise.
(load_specific_debug_sections): Likewise.
* testsuite/binutils-all/dw2-3.rS: Adjust alignment.
* testsuite/binutils-all/dw2-3.rt: Likewise.
2018-07-02 Thomas Preud'homme <thomas.preudhomme@arm.com>
* NEWS: Use command-line consistently when used in a compount word.

View File

@@ -13336,12 +13336,6 @@ dump_section_as_strings (Elf_Internal_Shdr * section, Filedata * filedata)
printable_section_name (filedata, section), chdr.ch_type);
return FALSE;
}
else if (chdr.ch_addralign != section->sh_addralign)
{
warn (_("compressed section '%s' is corrupted\n"),
printable_section_name (filedata, section));
return FALSE;
}
uncompressed_size = chdr.ch_size;
start += compression_header_size;
new_size -= compression_header_size;
@@ -13483,12 +13477,6 @@ dump_section_as_bytes (Elf_Internal_Shdr * section,
printable_section_name (filedata, section), chdr.ch_type);
return FALSE;
}
else if (chdr.ch_addralign != section->sh_addralign)
{
warn (_("compressed section '%s' is corrupted\n"),
printable_section_name (filedata, section));
return FALSE;
}
uncompressed_size = chdr.ch_size;
start += compression_header_size;
new_size -= compression_header_size;
@@ -13658,12 +13646,6 @@ load_specific_debug_section (enum dwarf_section_display_enum debug,
section->name, chdr.ch_type);
return FALSE;
}
else if (chdr.ch_addralign != sec->sh_addralign)
{
warn (_("compressed section '%s' is corrupted\n"),
section->name);
return FALSE;
}
uncompressed_size = chdr.ch_size;
start += compression_header_size;
size -= compression_header_size;

View File

@@ -1,3 +1,3 @@
#...
+\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +1
+\[[ 0-9]+\] .debug_info +(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ [0-9a-f]+ +C +0 +0 +(4|8)
#pass

View File

@@ -1,6 +1,6 @@
#...
+\[[ 0-9]+\] .debug_info
+(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +1
+(PROGBITS|MIPS_DWARF) +0+ +[0-9a-f]+ +[0-9a-f]+ +[0-9a-f]+ +0 +0 +(4|8)
+\[0+800\]: COMPRESSED
+ZLIB, 0+9d, 1
#pass

View File

@@ -1,3 +1,12 @@
2018-12-23 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 8.2.1.DATE-git.
* PROBLEMS: Likewise.
2018-12-23 Joel Brobecker <brobecker@adacore.com>
GDB 8.2.1 released.
2018-12-23 Joel Brobecker <brobecker@adacore.com>
* version.in: Set GDB version number to 8.2.1.

View File

@@ -1,5 +1,5 @@
Known problems in GDB 8.2.1
Known problems in GDB 8.2.1.DATE-git
See also: http://www.gnu.org/software/gdb/bugs/

View File

@@ -1 +1 @@
8.2.1
8.2.1.DATE-git

View File

@@ -1,3 +1,22 @@
2019-02-18 Nick Clifton <nickc@redhat.com>
Import from the mainline:
2018-12-02 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/23919
* merge.cc (Output_merge_string<Char_type>::do_add_input_section):
Get addralign from decompressed_section_contents.
* object.cc (build_compressed_section_map): Set info.addralign.
(Object::decompressed_section_contents): Add a palign
argument and store p->second.addralign in *palign if it isn't
NULL.
* object.h (Compressed_section_info): Add addralign.
(section_is_compressed): Add a palign argument, default it
to NULL, store p->second.addralign in *palign if it isn't NULL.
(Object::decompressed_section_contents): Likewise.
* output.cc (Output_section::add_input_section): Get addralign
from section_is_compressed.
2018-06-26 Nick Clifton <nickc@redhat.com>
* po/uk.po: Updated Ukranian translation.

View File

@@ -440,9 +440,11 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
{
section_size_type sec_len;
bool is_new;
uint64_t addralign = this->addralign();
const unsigned char* pdata = object->decompressed_section_contents(shndx,
&sec_len,
&is_new);
&is_new,
&addralign);
const Char_type* p = reinterpret_cast<const Char_type*>(pdata);
const Char_type* pend = p + sec_len / sizeof(Char_type);
@@ -494,7 +496,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
// aligned, so each string within the section must retain the same
// modulo.
uintptr_t init_align_modulo = (reinterpret_cast<uintptr_t>(pdata)
& (this->addralign() - 1));
& (addralign - 1));
bool has_misaligned_strings = false;
while (p < pend)
@@ -503,7 +505,7 @@ Output_merge_string<Char_type>::do_add_input_section(Relobj* object,
// Within merge input section each string must be aligned.
if (len != 0
&& ((reinterpret_cast<uintptr_t>(p) & (this->addralign() - 1))
&& ((reinterpret_cast<uintptr_t>(p) & (addralign - 1))
!= init_align_modulo))
has_misaligned_strings = true;

View File

@@ -751,11 +751,13 @@ build_compressed_section_map(
const unsigned char* contents =
obj->section_contents(i, &len, false);
uint64_t uncompressed_size;
Compressed_section_info info;
if (is_zcompressed)
{
// Skip over the ".zdebug" prefix.
name += 7;
uncompressed_size = get_uncompressed_size(contents, len);
info.addralign = shdr.get_sh_addralign();
}
else
{
@@ -763,8 +765,8 @@ build_compressed_section_map(
name += 6;
elfcpp::Chdr<size, big_endian> chdr(contents);
uncompressed_size = chdr.get_ch_size();
info.addralign = chdr.get_ch_addralign();
}
Compressed_section_info info;
info.size = convert_to_section_size_type(uncompressed_size);
info.flag = shdr.get_sh_flags();
info.contents = NULL;
@@ -3060,7 +3062,8 @@ const unsigned char*
Object::decompressed_section_contents(
unsigned int shndx,
section_size_type* plen,
bool* is_new)
bool* is_new,
uint64_t* palign)
{
section_size_type buffer_size;
const unsigned char* buffer = this->do_section_contents(shndx, &buffer_size,
@@ -3087,6 +3090,8 @@ Object::decompressed_section_contents(
{
*plen = uncompressed_size;
*is_new = false;
if (palign != NULL)
*palign = p->second.addralign;
return p->second.contents;
}
@@ -3108,6 +3113,8 @@ Object::decompressed_section_contents(
// once in this pass.
*plen = uncompressed_size;
*is_new = true;
if (palign != NULL)
*palign = p->second.addralign;
return uncompressed_data;
}

View File

@@ -373,6 +373,7 @@ struct Compressed_section_info
{
section_size_type size;
elfcpp::Elf_Xword flag;
uint64_t addralign;
const unsigned char* contents;
};
typedef std::map<unsigned int, Compressed_section_info> Compressed_section_map;
@@ -808,7 +809,8 @@ class Object
bool
section_is_compressed(unsigned int shndx,
section_size_type* uncompressed_size) const
section_size_type* uncompressed_size,
elfcpp::Elf_Xword* palign = NULL) const
{
if (this->compressed_sections_ == NULL)
return false;
@@ -818,6 +820,8 @@ class Object
{
if (uncompressed_size != NULL)
*uncompressed_size = p->second.size;
if (palign != NULL)
*palign = p->second.addralign;
return true;
}
return false;
@@ -828,7 +832,7 @@ class Object
// by the caller.
const unsigned char*
decompressed_section_contents(unsigned int shndx, section_size_type* plen,
bool* is_cached);
bool* is_cached, uint64_t* palign = NULL);
// Discard any buffers of decompressed sections. This is done
// at the end of the Add_symbols task.

View File

@@ -2448,7 +2448,14 @@ Output_section::add_input_section(Layout* layout,
unsigned int reloc_shndx,
bool have_sections_script)
{
section_size_type input_section_size = shdr.get_sh_size();
section_size_type uncompressed_size;
elfcpp::Elf_Xword addralign = shdr.get_sh_addralign();
if (object->section_is_compressed(shndx, &uncompressed_size,
&addralign))
input_section_size = uncompressed_size;
if ((addralign & (addralign - 1)) != 0)
{
object->error(_("invalid alignment %lu for section \"%s\""),
@@ -2498,11 +2505,6 @@ Output_section::add_input_section(Layout* layout,
}
}
section_size_type input_section_size = shdr.get_sh_size();
section_size_type uncompressed_size;
if (object->section_is_compressed(shndx, &uncompressed_size))
input_section_size = uncompressed_size;
off_t offset_in_section;
if (this->has_fixed_layout())