vppinfra: remove dead code in elf.c 66/34366/2
authorDamjan Marion <damarion@cisco.com>
Fri, 5 Nov 2021 18:44:17 +0000 (19:44 +0100)
committerFlorin Coras <florin.coras@gmail.com>
Fri, 5 Nov 2021 22:05:32 +0000 (22:05 +0000)
Type: refactor
Change-Id: Ia47644ca5fb7c848c0de7e7c3ed2c69e8d5cb80f
Signed-off-by: Damjan Marion <damarion@cisco.com>
src/vppinfra/elf.c

index 11fac45..7a74fad 100644 (file)
@@ -1455,7 +1455,6 @@ static void
 layout_sections (elf_main_t * em)
 {
   elf_section_t *s;
-  u32 n_sections_with_changed_exec_address = 0;
   u32 *deferred_symbol_and_string_sections = 0;
   u32 n_deleted_sections = 0;
   /* note: rebuild is always zero. Intent lost in the sands of time */
@@ -1614,7 +1613,6 @@ layout_sections (elf_main_t * em)
       if (s->header.flags & ELF_SECTION_FLAG_ALLOC)
        {
          s->exec_address_change = exec_address - s->header.exec_address;
-         n_sections_with_changed_exec_address += s->exec_address_change != 0;
          s->header.exec_address = exec_address;
        }