summaryrefslogtreecommitdiff
path: root/src/generic/scnSize.c
blob: e4cf1c1310a263e5271767c938e998ac11d86e87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <assert.h>
#include <sys/types.h>
#include <gelf.h>
#include <libelfu/libelfu.h>



size_t elfu_gScnSizeFile(const GElf_Shdr *shdr)
{
  assert(shdr);

  return shdr->sh_type == SHT_NOBITS ? 0 : shdr->sh_size;
}