2012-02-01 Mike Stump * srec.c (srec_set_section_contents): Add 64-bit output support. (srec_write_record): Likewise. (srec_write_section): Likewise. Index: binutils/bfd/srec.c =================================================================== *** binutils/bfd/srec.c (revision 2070) --- binutils/bfd/srec.c (working copy) *************** srec_set_section_contents (bfd *abfd, *** 897,904 **** else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff && tdata->type <= 2) tdata->type = 2; ! else tdata->type = 3; entry->data = data; entry->where = section->lma + offset; --- 897,907 ---- else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffff && tdata->type <= 2) tdata->type = 2; ! else if ((section->lma + offset + bytes_to_do - 1) <= 0xffffffff ! && tdata->type <= 2) tdata->type = 3; + else + tdata->type = 4; entry->data = data; entry->where = section->lma + offset; *************** srec_write_record (bfd *abfd, *** 956,961 **** --- 959,973 ---- switch (type) { + case 4: + TOHEX (dst, (address >> 56), check_sum); + dst += 2; + TOHEX (dst, (address >> 48), check_sum); + dst += 2; + TOHEX (dst, (address >> 40), check_sum); + dst += 2; + TOHEX (dst, (address >> 32), check_sum); + dst += 2; case 3: case 7: TOHEX (dst, (address >> 24), check_sum); *************** srec_write_section (bfd *abfd, *** 1019,1027 **** /* Validate number of data bytes to write. The srec length byte counts the address, data and crc bytes. S1 (tdata->type == 1) records have two address bytes, S2 (tdata->type == 2) records ! have three, and S3 (tdata->type == 3) records have four. ! The total length can't exceed 255, and a zero data length will ! spin for a long time. */ if (Chunk == 0) Chunk = 1; else if (Chunk > MAXCHUNK - tdata->type - 2) --- 1031,1039 ---- /* Validate number of data bytes to write. The srec length byte counts the address, data and crc bytes. S1 (tdata->type == 1) records have two address bytes, S2 (tdata->type == 2) records ! have three, S3 (tdata->type == 3) records have four and S4 ! (tdata->type == 4) records have eight. The total length can't ! exceed 255, and a zero data length will spin for a long time. */ if (Chunk == 0) Chunk = 1; else if (Chunk > MAXCHUNK - tdata->type - 2)